title: Multiple auth in middleware. Laravel 5.4
body: <p>Im new in PHP and Laravel. I try to search online but i cant get the right answer for my problem. I want my specific page accessible only by admin and user that already been authenticated. So basically, all the user need to login first. Heres my code. Thanks in advance.</p>
  
  <p><strong>HomeController.php</strong></p>
  
  <pre><code>class HomeController extends Controller
  {
      /**
       * Create a new controller instance.
       *
       * @return void
       */
      public function __construct()
      {
          $this-&gt;middleware('auth:web, auth:admin');
      }
  
      /**
       * Show the application dashboard.
       *
       * @return \Illuminate\Http\Response
       */
      public function index()
      {
          return view('accounts.user.user_dashboard');
      }
  }
  </code></pre>
  
  <p><strong>auth.php</strong></p>
  
  <pre><code>'guards' =&gt; [
      'web' =&gt; [
          'driver' =&gt; 'session',
          'provider' =&gt; 'users',
      ],
  
      'api' =&gt; [
          'driver' =&gt; 'token',
          'provider' =&gt; 'users',
      ],
      'admin' =&gt; [
          'driver' =&gt; 'session',
          'provider' =&gt; 'admins',
      ],
      'admin-api' =&gt; [
          'driver' =&gt; 'token',
          'provider' =&gt; 'admins',
      ],
  ],
  </code></pre>