I have the "admin" controller. In the add($model)
function I want to add some data inside the $model
.
How can I do something like this:
$this->$model->save($this->request->data);
Is there a better way?
Example:
Add Function
function add($model = null){
if($model != null){
$this->$model->save($this->request->data);
}
}