My project runs on PHP 8.1.18 Laravel 9.52.7 that uses Mongodb driver (https://github.com/jenssegers/laravel-mongodb).
Project::with(['skills' => function($q) {$q->select('_id', 'name');}])->first();
The following is part of the exception I get:
My project runs on PHP 8.1.18 Laravel 9.52.7 that uses Mongodb driver (https://github.com/jenssegers/laravel-mongodb).
Project::with(['skills' => function($q) {$q->select('_id', 'name');}])->first();
The following is part of the exception I get:
Copyright © 2021 Jogjafile Inc.
I see there r guys who Jump into just pulling down peoples reputation for asking questions. But anyway here is how I worked around the problem in case anyone faces the same:
The controller listing method:
The selecting method:
NB: Anyone to kindly show me how to solve this better.