Example #1
0
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => 'web'], function () {
    Route::auth();
    Route::get('/home', 'HomeController@index');
    Route::get('/', 'WelcomeController@index');
    Route::get('contact', 'PageController@contact');
    Route::get('about', 'PageController@about');
    Route::get('/home', 'HomeController@index');
    //Route::get('users', 'UsersController@index');
    //Route::get('users/create', 'UsersController@create');
    //Route::get('users/{id}', 'UsersController@show');
    //Route::post('users', 'UsersController@store');
    Route::RESOURCE('articles', 'ArticlesController');
});
Route::get('foo', ['middleware' => 'manager', function () {
    return 'admin';
}]);