fadlyshafa

Untitled

Sep 1st, 2019
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.95 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.     // master kategori
  23.     Route::get('master/kategori','Kategori_controller@index');
  24.     Route::get('master/kategori/add','Kategori_controller@add');
  25.     Route::post('master/kategori/add','Kategori_controller@store');
  26.  
  27. });
  28.  
  29. Route::get('keluar',function(){
  30.     \Auth::logout();
  31.     return redirect('login');
  32. });
  33.  
  34. Auth::routes();
  35.  
  36. Route::get('/home', function(){
  37.     return redirect('beranda');
  38. });
Advertisement
Add Comment
Please, Sign In to add comment