title: Laravel middleware not working
body: <p>I have a middleware class :-</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Middleware;
  
  
  use Closure;
  
  class isAdmin
  {
      /**
       * Handle an incoming request.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  \Closure  $next
       * @return mixed
       */
      public function handle($request, Closure $next)
      {
          if(auth()-&gt;user()-&gt;getIsAdminAttribute()){
  
              return $next($request);
  
  
          }
          abort(404);
      }
  }
  </code></pre>
  
  <p>In Kernel.php file:-</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http;
  
  use App\Http\Middleware\isAdmin;
  
  protected $routeMiddleware = [
          'isAdmin' =&gt; isAdmin::class,
      ];
  </code></pre>
  
  <p>In web.php route file:-</p>
  
  <pre><code>Route::get('users/list', 'UsersController@listUsers')-&gt;name('List_Users')-&gt;middleware('isAdmin');
  </code></pre>
  
  <p>I've tried to dump the </p>
  
  <pre><code>dd(auth()-&gt;user()-&gt;getIsAdminAttribute());
  </code></pre>
  
  <p>Nothing happen , like I am not assigning isAdmin middleware to that route at all.</p>