fadlyshafa

Untitled

Apr 30th, 2020
344
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. use Illuminate\Support\Facades\Route;
  4.  
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Web Routes
  8. |--------------------------------------------------------------------------
  9. |
  10. | Here is where you can register web routes for your application. These
  11. | routes are loaded by the RouteServiceProvider within a group which
  12. | contains the "web" middleware group. Now create something great!
  13. |
  14. */
  15.  
  16. Route::get('/', function () {
  17.     return view('welcome');
  18. });
  19.  
  20. Route::group(['middleware'=>'auth'],function(){
  21.     Route::get('/home', function(){
  22.         return redirect('admin');
  23.     });
  24.  
  25.     Route::get('admin','Admin\Beranda_controller@index');
  26.  
  27.     Route::get('admin/banner','Admin\Banner_controller@index');
  28.     Route::post('admin/banner','Admin\Banner_controller@update');
  29. });
  30.  
  31. Auth::routes();
  32.  
  33. Route::get('keluar',function(){
  34.     \Auth::logout();
  35.     return redirect('/');
  36. });
RAW Paste Data