title: Get user which is authenticated by Fortify in API routes Laravel 8
body: <p>I have a Laravel 8 application that uses Fortify with custom views to login and register users. I have some API routes that I want to get the logged-in user details on them as well. The problem is that I don't want to use Passport and other packages to make the job hard to generate tokens and so on because most of the routes are in the <code>web.php</code> and just some routes are on <code>api.php</code>, so what I have tried is like below :</p>
  <pre><code>dd(auth()-&gt;guard('api')-&gt;user());
  </code></pre>
  <p>However, it returns null and...</p>
  <pre><code>dd(Auth::user());
  </code></pre>
  <p>Again returns null. Is there any way to get the authenticated user in the API routes?</p>