title: Auth::user()->id returns "Trying to get property of non-object" -- Laravel 5.8
body: <h2>UPDATED 2</h2>
  
  <p>I made like and unlike method. But when I try to like the article, it returns an error. <code>Route [login] not defined.</code> </p>
  
  <p>I am using passport API login. I am giving token for login etc... I login without a problem. I see the the pages only auth user can see. But it seems when I like the article, <code>Auth::</code> doesn't understand user logged in or not. Maybe this is the problem. Because I am using Passport? So in the controller instead of <code>Auth::</code> </p>
  
  <p>I used it like <code>$user = $request-&gt;user();</code> (you can see the controller below.) But still same error popping when I like the article. <code>Route [login] not defined.</code></p>
  
  <p><strong>controller</strong> </p>
  
  <pre><code>public function postLikeArticle( Request $request, $articleID )
  {
      $article = Article::where('id', '=', $articleID)-&gt;first();
      $user = $request-&gt;user();
  
      $article-&gt;likes()-&gt;attach( $user-&gt;id, [
          'created_at'    =&gt; date('Y-m-d H:i:s'),
          'updated_at'    =&gt; date('Y-m-d H:i:s')
      ]);
  
    return response()-&gt;json( ['article_liked' =&gt; true], 201 );
  }
  
  public function deleteLikeArticle( Request $request, $articleID )
  {
      $article = Article::where('id', '=', $articleID)-&gt;first();
      $user = $request-&gt;user();
  
      $article-&gt;likes()-&gt;detach( $user-&gt;id );
  
      return response(null, 204);
  }
  </code></pre>
  
  <p><strong>Routes</strong></p>
  
  <pre><code>Route::middleware('auth:api')-&gt;group(function() {
      Route::get('/user', function (Request $request) {
          return $request-&gt;user();
      });
  
      Route::get('/articles/{id}/like', 'Api\ArticlesController@postLikeArticle');
      Route::get('/articles/{id}/like', 'Api\ArticlesController@deleteLikeArticle');
  
  });
  </code></pre>
  
  <p>If you need to see anymore file. please name it in the comment. </p>