title: Middleware on route level based on multiple user roles
body: <p>I have about 10 type of users role in <a href="https://laravel.com/docs/5.3/middleware" rel="nofollow noreferrer">laravel</a> application, where e.g. </p>
  
  <pre><code>  user_type_1 and user_type 4 are accessing url-1.
    user_type_7, user_type_5 and user_type 4 are accessing url-2.
    user_type_5, user_type_1, user_type_3 and user_type 6 are accessing url-3.
    ............................................
    ............................................
     n number of combination of routes. url according to user type.
  </code></pre>
  
  <p>My <code>route/web.php</code> file have about 1500 routes and currently not seperated as group using middleware. I have to restrict user for only urls that is authorized for that kind of user_type. Can you please suggest any better approach for doing this.</p>
  
  <p>I had tried with making combination of url with middleware group like below, but after few work left this approach. </p>
  
  <pre><code>Route::group(['middleware' =&gt; ['middleware_user_type_1', 'middleware_user_type_2']], function () {
          Route::get('url-1', 'XYZController@someMethod');
      });
  </code></pre>
  
  <p>In this way request first goes to first middleware in array and if not valid user type then not try with second middleware.   </p>