web.php 3.06 KB
Newer Older
jhon committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<?php

/*
|--------------------------------------------------------------------------
| 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!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group(['middleware' => ['web','auth']], function(){
    Route::get('/home', 'HomeController@index');
    Route::get('/', function () {

        if (Auth::user()->status=='admin'){
            return view('adminlte::admin.index');
24
        }else if(Auth::user()->status=='customer'){
jhon committed
25 26 27 28 29 30 31 32 33
            return view('adminlte::customer.index');
        }else if(Auth::user()->status=='kasir'){
            return view('adminlte::kasir.index');
        }else if(Auth::user()->status=='inventori'){
            return view('adminlte::inventori.index');
        }
    });
});

34 35


36

37 38 39
Route::group(['middleware' => ['web','auth','admin']], function () {
    Route::get('/laporanTransaksi', 'AdminController@laporanTransaksi');
    Route::get('/listPetugas', 'AdminController@listPetugas');
40

41 42
});

43 44 45



46 47
Route::group(['middleware' => ['web','auth','customer']], function () {
    Route::get('/BeliBarang', 'CustomerController@BeliBarang');
48 49 50
    Route::get('/CheckSaldo', 'CustomerController@CheckSaldo');


51
    Route::get('/RequestBarang', 'CustomerController@RequestBarang');
52 53 54 55 56 57
    Route::get('/createRequest/{id}', 'CustomerController@createRequest');
    Route::post('/storeRequest', 'CustomerController@storeRequest');
    Route::post('/saveRequest', 'CustomerController@saveRequest');


    Route::get('/HistoryTransaksi', 'CustomerController@HistoryTransaksi');
58 59
});

60 61 62



63
Route::group(['middleware' => ['web','auth','inventori']], function () {
64
    Route::get('/ListBarang', 'InventoriController@listBarang');
jhon committed
65 66 67 68 69
    Route::get('/create', 'InventoriController@create');
    Route::post('/store', 'InventoriController@store');
    Route::get('/edit/{id}', 'InventoriController@edit');
    Route::post('/update/{id}', 'InventoriController@update');
    Route::get('/delete/{id}', 'InventoriController@destroy');
70 71


jhon committed
72
    Route::get('/ListRequest', 'InventoriController@ListRequest');
73 74 75 76 77 78 79 80 81 82 83 84
    Route::get('/editRequest/{id}', 'InventoriController@editRequest');
    Route::post('/update/{id}', 'InventoriController@update');
    Route::get('/delete/{id}', 'InventoriController@destroy');


    Route::get('/DataRequest', 'InventoriController@DataRequest');
    Route::get('/createDataRequest', 'InventoriController@createDataRequest');
    Route::post('/storeDataRequest', 'InventoriController@storeDataRequest');
    Route::get('/editDataRequest/{id}', 'InventoriController@editDataRequest');
    Route::post('/updateDataRequest/{id}', 'InventoriController@updateDataRequest');
    Route::get('/deleteDataRequest/{id}', 'InventoriController@destroyDataRequest');

85 86
});

87 88 89



90 91
Route::group(['middleware' => ['web','auth','kasir']], function () {
    Route::get('/ListCustomer', 'KasirController@ListCustomer');
92

93
});