Skip to content

laravel 5.2 mutiple auth with roles and permessions, a rear manager center. 前后分开登陆后台权限管理中心

Notifications You must be signed in to change notification settings

xuanjiang1985/laravel-5-2

Repository files navigation

Laravel PHP Framework

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.

License

The Laravel framework is open-sourced software licensed under the MIT license

How to use (使用说明)

##please composer install firstly, after you clone these codes in your PC. (安装扩展包)

composer install

Create tables and db:seed (自动创建数据表,植入数据)

php artisan migrate
php artisan db:seed

The following is an Adminer account for super manager.(下面是后台超级管理员登陆)

url: http://localhost/jackadmin
account: admin@admin.com
password: 12345678

Routes in the group of middleware permession must have route name.(在权限中间件的路由必须有命名)

        Route::group(['middleware' => 'permession'], function(){
            //manager
            Route::get('/manager','ManagerController@index')->name('manager');
            Route::post('/manager/store','ManagerController@store')->name('manager.store');
            Route::post('/manager/update/{id}','ManagerController@update')->name('manager.update');
            Route::get('/manager/delete/{id}','ManagerController@delete')->name('manager.delete');
            Route::post('/manager/branch/{id}/store','ManagerController@branchStore')->name('manager.branch');
            //role
            Route::get('/role','RoleController@index')->name('role');
            Route::post('/role/store','RoleController@store')->name('role.store');
            Route::post('/role/update/{id}','RoleController@update')->name('role.update');
            Route::get('/role/delete/{id}','RoleController@delete')->name('role.delete');
            Route::post('/role/distribute/store/{id}','RoleController@distributeStore')->name('role.distribute');
        });    

add permessions into table permessions, you can login /jackadmin/permession to add permessions. like the below photo (登陆此URL手动将权限添加进数据库,如下图)

About

laravel 5.2 mutiple auth with roles and permessions, a rear manager center. 前后分开登陆后台权限管理中心

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published