Advertisement
fadlyshafa

Untitled

Mar 4th, 2020
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.04 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('/home');
  16. });
  17.  
  18. Route::get('/keluar',function(){
  19.     \Auth::logout();
  20.  
  21.     return redirect('/login');
  22. });
  23.  
  24. Route::group(['middleware'=>'auth'],function(){
  25.  
  26.     Route::get('/supplier','Supplier_controller@index');
  27.  
  28.     Route::get('/supplier/add','Supplier_controller@add');
  29.     Route::post('/supplier/add','Supplier_controller@store');
  30.  
  31.     Route::get('/supplier/{id}','Supplier_controller@edit');
  32.     Route::put('/supplier/{id}','Supplier_controller@update');
  33.  
  34.     Route::delete('/supplier/{id}','Supplier_controller@delete');
  35.  
  36. });
  37.  
  38. Auth::routes();
  39.  
  40. Route::get('/home', 'HomeController@index')->name('home');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement