I have a very basic function to delete stuff on a simple website on Laravel 4.x that works like this:
public function delete()
{
...
$Model = Input::get('Model');
$Action = $Model::find($Id);
...
}
Now on Laravel 5, I'm trying to do the same but so far I can't because the namespaces. Since the $Model is dynamic I don't want to make use for everything.
And something like this:
use App\C\Models as Model;
public function delete()
{
...
$Action = Model\$Model::find($Id);
...
}
Simple do not works. What'd be the right approach to get this to work?