123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- <?php
-
- use App\Helpers\Helper;
- use App\User;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Auth;
- use Illuminate\Support\Facades\Route;
- /*
- |--------------------------------------------------------------------------
- | Web Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register web routes for your application. These
- | routes are loaded by the RouteServiceProvider within a group which
- | contains the "web" middleware group. Now create something great!
- |
- */
-
- Auth::routes();
- Route::get('/', function () {
- // return view('welcome');
- return redirect(route('auth.index'));
- });
-
- Route::get('file/{file}', ['as' => 'get_file', 'uses' => 'UploadController@get_image'])->where('file', '(.*)');
-
- Route::group(['as' => 'fetch.', 'prefix' => 'fetch'], function () {
- Route::match(['get', 'post'], 'globalfetch', ['as' => 'globalfetch', 'uses' => 'FetchController@globalfetch']);
- });
-
- Route::match(['get', 'post'], 'cek-email', ['as' => 'cek_email', 'uses' => function (Request $request) {
- $status = true;
- $message = 'Inputan email tidak ditemukan';
- if (!empty($request['email'])) {
-
- $cek_email = User::where('email', $request['email']);
- $id = Hashids::decode($request['id']);
-
- if (!empty($id)) {
- $cek_email = $cek_email->where('id', '!=', $id);
- }
- $cek_email = $cek_email->first();
-
- if (!empty($cek_email)) {
- $status = true;
- $message = 'Email ' . $request['email'] . ' telah digunakan';
- } else {
- $status = false;
- $message = 'Email bisa digunakan';
- }
- }
-
- $response = [
- 'status' => $status,
- 'message' => $message,
- ];
-
- return response()->json($response);
- }]);
-
- Route::get('logout', function () {
- Auth::logout();
- session()->flush();
- session()->invalidate();
- return Redirect::to(route('login'))->with('message', 'logout');
- });
- /**COBA UPLOAD FILE */
- /**
- * Login
- */
- Route::group([
- 'prefix' => 'coba',
- 'namespace' => 'Coba',
- 'as' => 'coba.',
- ], function () {
-
- Route::group([
- 'prefix' => 'upload',
- 'as' => 'upload.',
- ], function () {
- Route::get('/', ['as' => 'index', 'uses' => 'UploadFile@index']);
-
- Route::post('upload-action', ['as' => 'upload_action', 'uses' => 'UploadFile@upload_action']);
- });
- });
- /**end upload file */
-
- /**
- * Login
- */
- Route::group([
- 'prefix' => 'auth',
- 'namespace' => 'Auth',
- 'as' => 'auth.',
- ], function () {
-
- Route::get('login', ['as' => 'index', 'uses' => 'LoginController@index']);
- Route::post('action-login', ['as' => 'action_login', 'uses' => 'LoginController@action_login']);
- });
-
-
- // Helper::declare_route();
- /**
- * route admin
- */
- Route::group(
- [
- 'middleware' => ['auth_cek', 'auth'],
- 'as' => 'admin.',
- 'namespace' => 'Admin',
- ],
- function () {
- //profil
- Route::group([
- 'prefix' => 'profile',
- 'namespace' => 'Profile',
- 'as' => 'profile.',
- ], function () {
-
- Route::get('update', ['as' => 'update', 'uses' => 'ProfileController@update']);
- Route::post('/update-action', ['as' => 'update_action', 'uses' => 'ProfileController@update_action']);
- });
- //end profile
-
- /**
- * Prefik admin.
- * Dashboard Controller
- */
- Route::get('dashboard', ['as' => 'dashboard', 'uses' => 'DashboardController@index']);
- Route::group([
- 'prefix' => 'dashboard',
- 'as' => 'dashboard.',
- ], function () {
- Route::get('dashboard-order-transfusi/{year?}', ['as' => 'transfusi', 'uses' => 'DashboardController@graph_order_transfusi']);
- Route::post('dashboard-modal-order-transfusi', ['as' => 'modal_transfusi', 'uses' => 'DashboardController@modal_graph_detail_order_transfusi']);
-
- Route::get('dashboard-order-dropping/{year?}', ['as' => 'dropping', 'uses' => 'DashboardController@graph_order_dropping']);
- Route::post('dashboard-modal-order-dropping', ['as' => 'modal_dropping', 'uses' => 'DashboardController@modal_graph_detail_order_dropping']);
-
- Route::get('dashboard-kantong-darah/{year?}', ['as' => 'kantong_darah', 'uses' => 'DashboardController@graph_kantong_darah']);
- Route::post('dashboard-modal-kantong-darah', ['as' => 'modal_kantong_darah', 'uses' => 'DashboardController@modal_graph_kantong_darah']);
- });
-
-
-
- Route::group(
- [
- 'prefix' => 'news',
- 'as' => 'news.',
- 'namespace' => 'Raharja',
-
- ],
- function () {
- Route::get('/', ['as' => 'index', 'uses' => 'NewsController@index']);
- Route::get('/get-data/{udd_id?}', ['as' => 'get_data', 'uses' => 'NewsController@getData']);
- Route::get('create', ['as' => 'create', 'uses' => 'NewsController@create']);
- Route::get('update/{news_id}', ['as' => 'update', 'uses' => 'NewsController@update']);
- Route::get('/delete-action/{news_id}', ['as' => 'delete_action', 'uses' => 'NewsController@delete_action']);
-
- Route::post('create-action', ['as' => 'create_action', 'uses' => 'NewsController@create_action']);
- Route::post('update-action', ['as' => 'update_action', 'uses' => 'NewsController@update_action']);
- }
- );
- Route::group(
- [
- 'prefix' => 'tips',
- 'as' => 'tips.',
- 'namespace' => 'Raharja',
-
- ],
- function () {
- Route::get('/', ['as' => 'index', 'uses' => 'TipsController@index']);
- Route::get('/get-data/{udd_id?}', ['as' => 'get_data', 'uses' => 'TipsController@getData']);
- Route::get('create', ['as' => 'create', 'uses' => 'TipsController@create']);
- Route::get('update/{news_id}', ['as' => 'update', 'uses' => 'TipsController@update']);
- Route::get('/delete-action/{news_id}', ['as' => 'delete_action', 'uses' => 'TipsController@delete_action']);
-
- Route::post('create-action', ['as' => 'create_action', 'uses' => 'TipsController@create_action']);
- Route::post('update-action', ['as' => 'update_action', 'uses' => 'TipsController@update_action']);
- }
- );
- Route::group(
- [
- 'prefix' => 'master_points',
- 'as' => 'master-points.',
- 'namespace' => 'Raharja',
-
- ],
- function () {
- Route::get('/', ['as' => 'index', 'uses' => 'MasterPointsController@index']);
- Route::get('/get-data/{udd_id?}', ['as' => 'get_data', 'uses' => 'MasterPointsController@getData']);
- Route::get('create', ['as' => 'create', 'uses' => 'MasterPointsController@create']);
- Route::get('update/{news_id}', ['as' => 'update', 'uses' => 'MasterPointsController@update']);
- Route::get('/delete-action/{news_id}', ['as' => 'delete_action', 'uses' => 'MasterPointsController@delete_action']);
-
- Route::post('create-action', ['as' => 'create_action', 'uses' => 'MasterPointsController@create_action']);
- Route::post('update-action', ['as' => 'update_action', 'uses' => 'MasterPointsController@update_action']);
- }
- );
- Route::group(
- [
- 'prefix' => 'message',
- 'as' => 'message.',
- 'namespace' => 'Raharja',
-
- ],
- function () {
- Route::get('/', ['as' => 'index', 'uses' => 'MessageController@index']);
- Route::get('/get-data/{udd_id?}', ['as' => 'get_data', 'uses' => 'MessageController@getData']);
- Route::get('create', ['as' => 'create', 'uses' => 'MessageController@create']);
- Route::get('/delete-action/{data_id}', ['as' => 'delete_action', 'uses' => 'MessageController@delete_action']);
- Route::get('select_user', ['as' => 'select_user', 'uses' => 'MessageController@selectUser']);
- Route::get('send/{data_id}', ['as' => 'send', 'uses' => 'MessageController@send']);
-
- Route::post('create-action', ['as' => 'create_action', 'uses' => 'MessageController@create_action']);
- }
- );
- Route::group(
- [
- 'prefix' => 'trivia',
- 'as' => 'trivia.',
- 'namespace' => 'Trivia',
-
- ],
- function () {
- Route::get('/', ['as' => 'index', 'uses' => 'TriviaController@index']);
- Route::get('/get-data/{udd_id?}', ['as' => 'get_data', 'uses' => 'TriviaController@getData']);
- Route::get('create', ['as' => 'create', 'uses' => 'TriviaController@create']);
- Route::get('update/{trivia_id}', ['as' => 'update', 'uses' => 'TriviaController@update']);
- Route::get('/delete-action/{trivia_id}', ['as' => 'delete_action', 'uses' => 'TriviaController@delete_action']);
-
- Route::post('create-action', ['as' => 'create_action', 'uses' => 'TriviaController@create_action']);
- Route::post('update-action', ['as' => 'update_action', 'uses' => 'TriviaController@update_action']);
- }
- );
- Route::group(
- [
- 'prefix' => 'kelompok_driver',
- 'as' => 'kelompok-driver.',
- 'namespace' => 'Raharja',
-
- ],
- function () {
- Route::get('/', ['as' => 'index', 'uses' => 'KelompokDriverController@index']);
- Route::get('/get-data/{data_id?}', ['as' => 'get_data', 'uses' => 'KelompokDriverController@getData']);
- Route::get('create', ['as' => 'create', 'uses' => 'KelompokDriverController@create']);
- Route::get('update/{data_id}', ['as' => 'update', 'uses' => 'KelompokDriverController@update']);
- Route::get('/delete-action/{data_id}', ['as' => 'delete_action', 'uses' => 'KelompokDriverController@delete_action']);
-
- Route::post('create-action', ['as' => 'create_action', 'uses' => 'KelompokDriverController@create_action']);
- Route::post('update-action', ['as' => 'update_action', 'uses' => 'KelompokDriverController@update_action']);
- }
- );
- Route::group(
- [
- 'prefix' => 'event_organisasi',
- 'as' => 'event-organisasi.',
- 'namespace' => 'Raharja',
-
- ],
- function () {
- Route::get('/', ['as' => 'index', 'uses' => 'EventOrganisasiController@index']);
- Route::get('/get-data/{data_id?}', ['as' => 'get_data', 'uses' => 'EventOrganisasiController@getData']);
- Route::get('create', ['as' => 'create', 'uses' => 'EventOrganisasiController@create']);
- Route::get('update/{data_id}', ['as' => 'update', 'uses' => 'EventOrganisasiController@update']);
- Route::get('kelompok-driver/{data_id}', ['as' => 'kelompok_driver', 'uses' => 'EventOrganisasiController@kelompokDriver']);
- Route::get('/delete-action/{data_id}', ['as' => 'delete_action', 'uses' => 'EventOrganisasiController@delete_action']);
- Route::get('/get-data-kelompok-driver/{data_id?}', ['as' => 'get_data_kelompok_driver', 'uses' => 'EventOrganisasiController@getDataKelompokDriver']);
- Route::get('/delete-kelompok-driver/{data_id}', ['as' => 'delete_kelompok_driver', 'uses' => 'EventOrganisasiController@deleteKelompokDriver']);
- Route::get('select_kelompok_driver', ['as' => 'select_kelompok_driver', 'uses' => 'EventOrganisasiController@selectKelompokDriver']);
-
- Route::post('create-action', ['as' => 'create_action', 'uses' => 'EventOrganisasiController@create_action']);
- Route::post('update-action', ['as' => 'update_action', 'uses' => 'EventOrganisasiController@update_action']);
- Route::post('add_kelompok_driver', ['as' => 'add_kelompok_driver', 'uses' => 'EventOrganisasiController@addKelompokDriver']);
- }
- );
-
- // end route raharja
-
- }
- );
-
- // Helper::declare_route();
-
-
- app('App\Http\Controllers\Admin\User_management\PermissionController')->route();
- app('App\Http\Controllers\Admin\User_management\UserController')->route();
- app('App\Http\Controllers\Admin\User_management\RoleController')->route();
- app('App\Http\Controllers\Admin\TransportationController')->route();
|