title: Error Call to a member function posts() on null
body: <p>Please i need help, am trying to create post for user and everything was working well until i tried to auth the user to show that the post belongs to a logged in user but am getting this error. please which other way can i check for a logged in user? fine my code below:</p>
  <p>PostController:</p>
  <pre><code>public function store()
  {
      $data = request()-&gt;validate([
          'title'=&gt; 'required',
          'description' =&gt;'required',
          'image'=&gt;'required|image',
      ]);
      
      auth()-&gt;user()-&gt;posts()-&gt;create($data);
  
  }
  </code></pre>
  <p>Web:</p>
  <pre><code>Route::post('/p', [PostController::class, 'store']);
  </code></pre>