×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Mohammad Mehdi Moosavi
Added: May 2, 2016 11:10 AM
Views: 1947
Tags: route
  1. <?php
  2.  
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Application Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register all of the routes for an application.
  9. | It's a breeze. Simply tell Laravel the URIs it should respond to
  10. | and give it the controller to call when that URI is requested.
  11. |
  12. */
  13.  
  14. Route::get('/','IndexController@index');
  15. Route::resource('/admin','AdminController');
  16.  
  17.  
  18.  
  19. Route::group(['middleware' => 'admin'], function()
  20. {
  21.     Route::get('/dashboard', 'IndexController@index');
  22. });
  23.