database - Laravel 5.x how to set admin user authorize to create user -


i want create user called "headmaster" can create other users (teacher) in laravel 5.x project. can use library in laravel because told me can use middleware ? show me method , using library, not neccessary code! sorry bad english

manually

you can use library permissions zizaco/entrust

after follow instructions have crud routes users (of course need write model , controller them aswell)

route::group(['prefix' => 'admin', 'middleware' => ['role:admin']], function() {     route::get('/', 'admincontroller@users');     route::get('/', 'admincontroller@createusers'); });  

automatically

i suggest use voyager admin panel have many cool features. bepends on want panel might useful. if crud users suggest manually.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -