Advertisement
fadlyshafa

Untitled

Apr 30th, 2020
687
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.05 KB | None | 0 0
  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.     // about us
  31.     Route::get('admin/about-us','Admin\About_us_controller@index');
  32.     Route::post('admin/about-us','Admin\About_us_controller@update');
  33. });
  34.  
  35. Auth::routes();
  36.  
  37. Route::get('keluar',function(){
  38.     \Auth::logout();
  39.     return redirect('/');
  40. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement