Trying to implement a basic CRUD controller.
In the parent controllers I define which model will be used for that specific controller. In the base class I then want to be able to say something like:
$model = $this->getModelName(); //This function is defined in every controller
$model = new $model;
Now I cant do the new $model due to it not being loaded in the namespace. What is the best way of going about that? I dont really want to go down the route of having a 20 line use statement at the top of the controller or is that the only option?