Hello. No I want to share how to about to create user role/permission by access URI. Oke now the first you must download new CodeIgniter 3 in this site https://www.codeigniter.com/download.
After that we must open CodeIgniter framework on your editor. Example I use sublime text.
Oke lest go code, the first we must change config/autoload.php and add auto load library ‘session’ and helper ‘url’.
/* | ------------------------------------------------------------------- | Auto-load Libraries | ------------------------------------------------------------------- | These are the classes located in system/libraries/ or your | application/libraries/ directory, with the addition of the | 'database' library, which is somewhat of a special case. | | Prototype: | | $autoload['libraries'] = array('database', 'email', 'session'); | | You can also supply an alternative library name to be assigned | in the controller: | | $autoload['libraries'] = array('user_agent' => 'ua'); */ $autoload['libraries'] = array('session'); /* | ------------------------------------------------------------------- | Auto-load Drivers | ------------------------------------------------------------------- | These classes are located in system/libraries/ or in your | application/libraries/ directory, but are also placed inside their | own subdirectory and they extend the CI_Driver_Library class. They | offer multiple interchangeable driver options. | | Prototype: | | $autoload['drivers'] = array('cache'); */ $autoload['drivers'] = array(); /* | ------------------------------------------------------------------- | Auto-load Helper Files | ------------------------------------------------------------------- | Prototype: | | $autoload['helper'] = array('url', 'file'); */ $autoload['helper'] = array('url');
Then change config/database.php with your database config.
(more…)