how to assign a model to a variable in laravel code example
Example: use model from variable laravel
$model_name = 'App\Model\User';
$model_name::where('id', $id)->first();
$model = $this->model_name;
$model::where('id', $id)->first();
$model_name = 'App\Model\User';
$model_name::where('id', $id)->first();
$model = $this->model_name;
$model::where('id', $id)->first();