fadlyshafa

Untitled

Jan 8th, 2020
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.29 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Web Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register web routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | contains the "web" middleware group. Now create something great!
  11. |
  12. */
  13.  
  14. Route::get('/', function () {
  15.     return redirect('beranda');
  16. });
  17.  
  18. Route::group(['middleware'=>'auth'],function(){
  19.  
  20.     Route::get('beranda','Beranda_controller@index');
  21.  
  22.     Route::get('paket-laundry','Paket_controller@index');
  23.  
  24.     Route::get('paket-laundry/add','Paket_controller@add');
  25.     Route::post('paket-laundry/add','Paket_controller@store');
  26.  
  27.     Route::get('paket-laundry/{id}','Paket_controller@edit');
  28.     Route::put('paket-laundry/{id}','Paket_controller@update');
  29.  
  30.     Route::delete('paket-laundry/{id}','Paket_controller@delete');
  31.  
  32.     // customer
  33.     Route::get('customer','Customer_controller@index');
  34.     Route::get('customer/add','Customer_controller@add');
  35.     Route::post('customer/add','Customer_controller@store');
  36.  
  37. });
  38.  
  39. Auth::routes();
  40.  
  41. Route::get('/home', function(){
  42.     return redirect('beranda');
  43. });
  44.  
  45. Route::get('keluar',function(){
  46.     \Auth::logout();
  47.     return redirect('login');
  48. });
Advertisement
Add Comment
Please, Sign In to add comment