Coder Social home page Coder Social logo

xuanjiang1985 / laravel-5-2 Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 957 KB

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

PHP 44.89% JavaScript 1.22% ApacheConf 0.17% Ruby 1.57% CSS 21.13% Makefile 0.35% HTML 30.67%

laravel-5-2's Introduction

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: [email protected]
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手动将权限添加进数据库,如下图)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.