Closed anonymuos1 closed 2 months ago
Hi!
How can I use my custom filter in filter() method?
trait ModelFilter { public function filterCustomOwn(Builder $builder, $value) { ..... return $builder; } }
This not work: Model::filter(["own" => 1])->paginate();
Model::filter(["own" => 1])->paginate();
But works from url, if I not pass data to filter() method.
Thank you!
@anonymuos1
I checked and seems there isn't any problem with it. I guess you made a mistake in another place unless you are sure, provide more information about the problem.
Hi!
How can I use my custom filter in filter() method?
This not work:
Model::filter(["own" => 1])->paginate();
But works from url, if I not pass data to filter() method.
Thank you!