I have an administrative panel with several areas of your item listings for each table itself. What's best to do:
A action 'list' for each Controller responsible for each area:class aController extends Controller{
public function list(){
}
}
class bController extends Controller{
public function list(){
}
}
class cController extends Controller{
public function list(){
}
}
Or make a Controller 'ListController' by getting parameters:
class ListController extends Controller{
public function index($table){
}
}
The last case seems to solve the problem of code repetitions, but I do not know if it will bring problems in the future.