I hope I am not crazy , as I am new to this framework and really need expert opinion in this regard .
My client requested me to expose all database tables for basic CRUD operations and with the passage of time we might add/delete tables . I know how to use gii to generate MVC stuff for a table , but that seems to be extra/repeating code/view for nothing . What I want is to use single controller and model to expose basic CRUD + search operation on any table in database ,which we pass it as parameter.
for example : I have a link index?r=backend/list/users
where backend points to common controller BackendController
list is entry method in that controller
users is parameter we want to pass .
When accesses this controller should read the schema for the parameter tables ‘users’
– list all the records (paginate)
– provide add/edit/search/delete(multiple) record links
a delete link might look
index?r=backend/delete/users/12
a edit link might look
index?r=backend/edit/users/12
Same for all the tables in current application database (will be accessible for admin users only)
I tried to use Gii to generate the CRUD form of the table but its seems that it requires model.
Please guide me with your expert opinion
thanks in advance