title: Class App\Http\UserMiddleware does not exist
body: <p>Class App\Http\UserMiddleware does not exist</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Middleware;
  
  
  
  use Closure;
  Use Auth;
  
  class UserMiddleware
  {
      /**
       * Handle an incoming request.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  \Closure  $next
       * @return mixed
       */
  
   public function handle($request, Closure $next)
  
   {
  
       if(auth::check() &amp;&amp; Auth::user()-&gt;role-&gt;id == 2){
  
           return $next($request);
  
       }
    else {
  
           return redirect()-&gt;route('login');
  
       }
   }
  }
  </code></pre>