Phalcon: View Structure for Multiple Roles!!

Hi. I have a project, where users have multiple roles:

define ('GUEST',0); define ('ADMIN',1); define ('PRO',2);

Depending on the role, I want to pull a different view in some cases. I'm wondering the best way to structure the folder/files for the views.

Should each role have a folder, and I look to see if the view exists/if not go to the next role? Or do I do this with file names ->index_admin.volt, index_pro.volt?

To your taste. I would do through the folder, so for me it is more convenient. Less action extra.

If the pages are similar to each other, but the admin, for example, needs to display additional fields, then you should consider the access system and make a conclusion in the template:

{% if AUTH.isAllowController('logs', 'index') %}
    {# Show info for user #}
{% endif %}

The basis can be taken ACL

If you know more about the UTI in hindi so plz visit our official website

edited 4d ago

Indian Air Force: A Cut Above [DISHA – IAF HQ] is a Alternative of PUBG Hack.

Indian Air Force’s mobile gaming application • The official mobile gaming application of the IAF will allow an aspirant to experience first hand the roles of an IAF air warrior, as well as means to apply and appear for recruitment from the comfort of his/her mobile phone. • The gaming application will have various features, including offline single player missions, an online multiplayer and a career navigator information section as well as augmented reality features.


Also Visit :

Pubg Hacking Tools : Veteran Mode , DS-H-IRAQAndroid 9 Pie, Virtual Android Pie 9 , Strange VPN , Tamilrockers