Visual Studio Code can’t find files inside vendor folder (Laravel project)

Fix 1. I am not sure how many projects you have but I think you can enable this by changing the excludefile settings. Go to VSCode > Preferences > Settings or press ⌘,. Search for files.exclude and make **/.git to false. Fix 2 OR try to search for search.useIgnoreFiles in your settings and make it … Read more

laravel APi resource Call to undefined method Illuminate\Database\Query\Builder::mapInto()

The problem is that you use UserResource::collection($this->user) and you have just one element not a collection so you can replace it with new UserResource($this->user) like this : return [ ‘id’ => $this->id, ‘title’ => $this->title, ‘slug’ => $this->slug, ‘bodys’ => $this->body, ‘users’ => new UserResource($this->user), ‘published’ => $this->published, ‘created_at’ => $this->created_at, ‘updated_at’ => $this->updated_at, ];