build a Model helper in laravel/lumen

329 Views Asked by At

i want to build custom model helper in lumen(laravel) and use it

User::listOption($listOption);
Product::listOption($listOption);

and $listOption is a json come from api like this

{filters:[{property:"name",value:"john"}]

and result must include all user's whit name john

and i want to reuse this for any table

how to create this helper

0

There are 0 best solutions below