Browse Source

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.
Ilya Kudin 7 years ago
parent
commit
9aeef9812a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/Auth/LoginController.php

+ 1 - 1
app/Http/Controllers/Auth/LoginController.php

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