php - user_id condition on all models -
this question has answer here:
- setting default model conditions 1 answer
i trying develop app multiple users. each users have example own clients, invoices, settings, profile etc.
by default cakephp generated controllers/models/views show clients, invoices etc beloning users.
so have edit add,view,index,edit , delete actions users can view,edit,add,delete own clients,invoices,settings,profile etc.
i wondering if there easier more general way this. doing in appcontroller.php or appmodel.php not needed each controller/model/view.
or if cakephp automatically can since hasmany, belongsto etc properties correctly set.
the same question has been asked , answered me in detail here: setting default model conditions
it includes behavior example well.
Comments
Post a Comment