Tucker-Eric / EloquentFilter

An Eloquent Way To Filter Laravel Models And Their Relationships
http://tucker-eric.github.io/EloquentFilter
MIT License
1.72k stars 120 forks source link

Filter data with custom condition #106

Closed mohammad76 closed 4 years ago

mohammad76 commented 4 years ago

hi I want filter my data with one of my meta table but I can not, can you help me?

return data to response return Business::filter($request->all())->with('city' , 'state' , 'main_image' , 'features')->get();

filter method public function price_level($level) { return $this->where('price_level', $level); }

price_level, not one of the Business columns it's come from meta table with sofa/eloquence-metable.

I think filter method not called because I put dd and nothing happened