Personally I would use api resources to ensure that you are showing exactly the content you want. Buy you can try - >through()`
Example here in pingcrm https://github.com/inertiajs/pingcrm/blob/master/app/Http/Controllers/ContactsController.php#L24
hello every one, i have a problem with using makeVisible() with paginate() functions in one query, i want to retrieve a hidden property with the makeVisible function, but when is use makeVisible(), the pagination details will be lose, for example: current_page, next_url_page, ... please suggest a solution for me.
here is an example of my query:
$questions = Quizes::paginate(20);
return $questions->makeVisible(['correct_answer'])->toArray();
Personally I would use api resources to ensure that you are showing exactly the content you want. Buy you can try - >through()`
Example here in pingcrm https://github.com/inertiajs/pingcrm/blob/master/app/Http/Controllers/ContactsController.php#L24
Please or to participate in this conversation.