Laravel 5 - Auth Middleware dont protect route but throw error message <p>I have some problems with my auth middleware. I want to protect my routes with it, but in some controllers it dosent work really. If I check the routes as logout user, I got different error messasges instead of blocking the access and redirect to the login page. I use the middleware always over the __construct() in the controllers.</p> <p>An example.</p> <p>Controller</p> <pre><code>public function show(Dialog $dialog) { return $this-&gt;template($dialog, self::DISPLAY_MODE_DIALOG); } protected function template(Dialog $dialog, $displayMode, $messageLimit = 10) { $user = Auth::user(); // Check if the profile is currently controlled by the current user $isControlled = $dialog-&gt;moderator()-&gt;appProfile()-&gt;isControlledBy($user-&gt;id); $messageList = $dialog-&gt;latestMessages($messageLimit); return view('dialog.chat.template') -&gt;with(compact('dialog', 'messageList', 'isControlled', 'displayMode')); } </code></pre> <p>Model</p> <pre><code>public function isAccessibleBy(User $user) { $profile = $this-&gt;moderator()-&gt;appProfile(); return $profile-&gt;isOwner($user-&gt;id) || $profile-&gt;isControlledBy($user-&gt;id); } </code></pre> <p>Error </p> <blockquote> <p>Argument 1 passed to App\Model\Dialog\Dialog::isAccessibleBy() must be an instance of App\Model\Account\User, null given, called in C:\projekte\php\newchat\app\Model\Dialog\Dialog.php on line 332 and defined</p> </blockquote> <p>Now I realize why this happens, but i think the middleware should dont show this messages an protecte the route.</p> <p><a href="http://laravel.com/docs/5.0/middleware" rel="nofollow">http://laravel.com/docs/5.0/middleware</a></p> <blockquote> <p>"However, if the user is authenticated, the middleware will allow the request to proceed further into the application."</p> </blockquote>