Welcome Guest, Not a member yet? Register   Sign In
Suggestion for Best practice for Menu rbac
#4

This is very bad practice in my opinion.
You generate html in php. You can do this. But if you do it, use the advantage of php.
One advantage is: generate dynamic output.

Another point is: a couple of functions are redundant. Why you do this?

In your case your output is static. You can do something like this:

if(loggin)
load->view('menuloggedin')
if(admin)
load->view('adminmenu')
if( ...)
load->view('...');

It is more cleaner in my opinion.
Reply


Messages In This Thread
RE: Suggestion for Best practice for Menu rbac - by hobbyci - 10-06-2020, 03:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB