More clear way to assign middleware in controller
Assign guest middleware to LoginController using documented way https://laravel.com/docs/5.4/controllers#controller-middleware to avoid confusing with $options array values meaning.
This commit is contained in:
@@ -34,6 +34,6 @@ class LoginController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->middleware('guest', ['except' => 'logout']);
|
$this->middleware('guest')->except('logout');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user