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:
parent
d905b2e7be
commit
9aeef9812a
|
@ -34,6 +34,6 @@ class LoginController extends Controller
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest', ['except' => 'logout']);
|
||||
$this->middleware('guest')->except('logout');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue