RedEnderZ
RedEnderZ

Reputation: 35

Route::Auth not surrounded in Middleware

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for 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.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::auth();

Route::get('/home', 'HomeController@index');

Laravel routes.php. So when I look at Auth examples for Laravel 5.2, I ALWAYS ALWAYS see the Route::auth(); and Route::get('/home', 'HomeController@index') encapsulated in { of the Route::group(['middleware' => ['web']], function () { thing. But whenever I use the commands php artisan make:auth all it does is create the one I showed above.

Any clues on why this does this? It works fine and all but I'm not 100% sure if it's functioning properly. But I can tell you that I can login and sign-up properly. Did they do any changes to Laravel?

Upvotes: 0

Views: 49

Answers (1)

Angad Dubey
Angad Dubey

Reputation: 5452

the web middleware is now applied by default:

https://github.com/laravel/laravel/tree/master/app/Http

Also in Kernel.php

https://github.com/laravel/laravel/blob/master/app/Http/Kernel.php

Upvotes: 2

Related Questions