title: Call to a member function tokens() on null on Laravel Sanctum
body: <p>I get this error when i am trying to logout the user</p>
  <pre><code>  public function logout(Request $request)
      {
         $request-&gt;user()-&gt;tokens()-&gt;delete();
      }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/09T6r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/09T6r.png" alt="enter image description here" /></a></p>