Looking for others thoughts on this.
I know it should be Fat Model and thin controllers.
However when I have worked in RoR or Laravel and even in my old job with there own framework. I have always had my crud functions in my controller.
So eg.
or
however people are advising me to use one controller per action which seams to be a bit overkill and causes duplication.
They are claiming its more SOLID
however in my mind a controller should kind of represent an object am i correct in this thinking or wrong?
I know it should be Fat Model and thin controllers.
However when I have worked in RoR or Laravel and even in my old job with there own framework. I have always had my crud functions in my controller.
So eg.
PHP:
Class page extends BaseController
{
public function get(){
if(isset($id)){
// do some stuff
}
}
public function post(){
//do some stuff
}
}
or
PHP:
class page extends CaseController{
public function show(){}
public function edit(){}
public function update(){}
public function list(){}
public function delete()[]
}
however people are advising me to use one controller per action which seams to be a bit overkill and causes duplication.
They are claiming its more SOLID
however in my mind a controller should kind of represent an object am i correct in this thinking or wrong?