I have this code for example:
$sheet_data=Model::where('workbook_ord',"$workbook")->get();
I want to assign where
block to Model
dynamically like this:
$qry = 'where("workbook_ord","$workbook")';
and I want the query to become like this:
$sheet_data=Model::eval($qry)->get();
I know if I want to use method name dynamically, I can use that like this:
$qry = "where";
$sheet_data=Model::$qry('workbook_ord',"$workbook")->get();
But, I want to execute function including parametera defined in a string.
I hope there must be a way to do that.