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:
Ilya Kudin 2017-04-18 19:13:35 +07:00 committed by GitHub
parent d905b2e7be
commit 9aeef9812a
1 changed files with 1 additions and 1 deletions

View File

@ -34,6 +34,6 @@ class LoginController extends Controller
*/ */
public function __construct() public function __construct()
{ {
$this->middleware('guest', ['except' => 'logout']); $this->middleware('guest')->except('logout');
} }
} }