How to Filter Translatable Field #4324
Answered
by
crynobone
ibrahim-999
asked this question in
Q&A
-
Description:i want to filter a resource according to title wether English or other language any help Detailed
|
Beta Was this translation helpful? Give feedback.
Answered by
crynobone
May 30, 2022
Replies: 1 comment
-
Shouldn't the following just work? public function apply(Request $request, $query, $value)
{
return $query->whereNotNull($value);
}
public function options(Request $request)
{
return [
'ES' => 'title->es',
'En' => 'title->en'
];
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
crynobone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't the following just work?