I get the following error when adding to the command line like this:
error: Call to undefined method Illuminate\Database\Eloquent\Builder::mapInto()
If i leave out the command line Project::where('user_id', auth()->user()->id)
go and replace it with the command line Project::all()
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.
I have consulted the following post to be able to retrieve by user_id: I have an idea to use auth middleware to retrieve a user's products