title: Call to undefined method Illuminate\Database\Eloquent\Builder::mapInto()
body: <p>I get the following error when adding to the command line like this:</p>
  <blockquote>
  <p>error: Call to undefined method
  Illuminate\Database\Eloquent\Builder::mapInto()</p>
  </blockquote>
  <p>This is my code:
  <a href="https://i.stack.imgur.com/3i4Fl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3i4Fl.png" alt="enter image description here" /></a></p>
  <p>If i leave out the command line <code>Project::where('user_id', auth()-&gt;user()-&gt;id)</code> go and replace it with the command line <code>Project::all()</code>
  everything works fine but i want to get the list of projects belonging to a certain user then i have to use the other command this makes me almost like i can't find a way to deal with it.</p>
  <p>Error message:
  <a href="https://i.stack.imgur.com/EpnzW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EpnzW.png" alt="enter image description here" /></a></p>
  <p>I have consulted the following post to be able to retrieve by user_id:
  <a href="https://stackoverflow.com/questions/68770468/i-have-an-idea-to-use-auth-middleware-to-retrieve-a-users-products">I have an idea to use auth middleware to retrieve a user&#39;s products</a></p>