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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -