BelongsToMany Searchable "SELECT *" #3478
Answered
by
KasparRosin
henryavila
asked this question in
Q&A
-
Hi, I have a DB tha sotre some files on DB. The problem is that When using BelongsToMany::make('Name', 'relation', Resource::class)->searchable(), It will generate a SQL with SELECT * FROM ... How Can I setup BelongsToMany searchable to run a query withou SELECT * (in tis cau, I wann all fields, except the binary field) |
Beta Was this translation helpful? Give feedback.
Answered by
KasparRosin
Jul 30, 2021
Replies: 1 comment 1 reply
-
Would relatable query solve this? If you put the relatableQuery function inside your public static function relatableUsers(NovaRequest $request, $query)
{
return $query->select('id', 'name');
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
henryavila
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would relatable query solve this?
If you put the relatableQuery function inside your
Resource::class