php - user_id condition on all models -


this question has answer here:

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

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -