title: Laravel Auth in middleware
body: <p>I have some problems with authentication on my middleware file.
  I'm logging on which page is client last seen, like so:</p>
  <pre><code>public function handle(Request $request, Closure $next)
      {
          Activity::create(['user_id' =&gt; Auth::id(), 'ip_id' =&gt; SecureAgent::getIP(), 'action' =&gt; $request-&gt;method(), 'page' =&gt; $request-&gt;path()]);
          
  
          return $next($request);
      }
  </code></pre>
  <p>File in Karnel is added in $middleware;</p>
  <p>The problem is that Auth::id() is not working, only NULL. I have logged in with passport, set my token and redirect to profile page, everything is working fine except this middleware.</p>