Per https://laravel.com/docs/5.3/routing#route-groups , I can add auth
middleware as follows:
Route::group(['middleware' => 'auth'], function () { Route::get('/', function () {
I also noticed that middleware was added as follows:
Route::group(['middleware' => ['web']], function() { // Uses all Middleware $middlewareGroups['web'] located in /app/Http/kernel.php? Route::resource('blog','BlogController'); //Make a CRUD controller });
How can I do both?
PS. Any comments that give an idea of ββwhat the bottom four lines of code are doing will be appreciated.
source share