├── .env.example ├── .gitattributes ├── .gitignore ├── app ├── Console │ ├── Commands │ │ └── Inspire.php │ └── Kernel.php ├── Events │ └── Event.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── AdminController.php │ │ │ ├── IndexController.php │ │ │ ├── PermissionController.php │ │ │ ├── RoleController.php │ │ │ └── UserController.php │ │ ├── Auth │ │ │ ├── AuthController.php │ │ │ └── PasswordController.php │ │ └── Controller.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── RoleAuth.php │ │ ├── RoleBase.php │ │ ├── RoleMenu.php │ │ └── VerifyCsrfToken.php │ ├── Requests │ │ ├── CreatePermissionRequest.php │ │ ├── CreateUserRequest.php │ │ ├── EditPermissionRequest.php │ │ ├── EditUserRequest.php │ │ ├── Request.php │ │ └── RoleRequest.php │ └── routes.php ├── Jobs │ └── Job.php ├── Listeners │ └── .gitkeep ├── Models │ ├── Permission.php │ └── __User.php ├── Permission.php ├── Policies │ └── .gitkeep ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Role.php └── User.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── compile.php ├── database.php ├── filesystems.php ├── mail.php ├── menu.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── ModelFactory.php ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2016_06_29_092226_add_some_cloumns_to_users.php │ ├── 2016_06_29_151412_entrust_setup_tables.php │ └── 2016_07_03_152707_add_group_to_permissions.php └── seeds │ ├── .gitkeep │ ├── DatabaseSeeder.php │ ├── RbacSeeder.php │ ├── UsersTableSeeder.php │ └── rbac.sql ├── gulpfile.js ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── index.php ├── robots.txt ├── static │ └── admin │ │ ├── css │ │ ├── category.css │ │ └── public.css │ │ ├── images │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── bg_icon.png │ │ ├── forbidden.jpg │ │ ├── ico-tips.gif │ │ ├── ico-tips.png │ │ └── tab_sign.png │ │ ├── js │ │ ├── admin.js │ │ └── jquery.min.js │ │ └── zui │ │ ├── .DS_Store │ │ ├── css │ │ ├── zui-theme.css │ │ ├── zui-theme.min.css │ │ ├── zui.css │ │ ├── zui.lite.css │ │ ├── zui.lite.min.css │ │ └── zui.min.css │ │ ├── fonts │ │ ├── zenicon.eot │ │ ├── zenicon.svg │ │ ├── zenicon.ttf │ │ └── zenicon.woff │ │ ├── js │ │ ├── zui.js │ │ ├── zui.lite.js │ │ ├── zui.lite.min.js │ │ └── zui.min.js │ │ └── lib │ │ ├── board │ │ ├── zui.board.css │ │ ├── zui.board.js │ │ ├── zui.board.min.css │ │ └── zui.board.min.js │ │ ├── calendar │ │ ├── zui.calendar.css │ │ ├── zui.calendar.js │ │ ├── zui.calendar.min.css │ │ └── zui.calendar.min.js │ │ ├── chart │ │ ├── chart.js │ │ └── chart.min.js │ │ ├── chosen │ │ ├── chosen.css │ │ ├── chosen.icons.css │ │ ├── chosen.icons.js │ │ ├── chosen.icons.min.css │ │ ├── chosen.icons.min.js │ │ ├── chosen.js │ │ ├── chosen.min.css │ │ └── chosen.min.js │ │ ├── datatable │ │ ├── zui.datatable.css │ │ ├── zui.datatable.js │ │ ├── zui.datatable.min.css │ │ └── zui.datatable.min.js │ │ ├── datetimepicker │ │ ├── datetimepicker.css │ │ ├── datetimepicker.js │ │ ├── datetimepicker.min.css │ │ └── datetimepicker.min.js │ │ ├── droppable │ │ ├── droppable.js │ │ └── droppable.min.js │ │ ├── hotkey │ │ ├── hotkey.js │ │ └── hotkey.min.js │ │ ├── ieonly │ │ ├── excanvas.js │ │ ├── html5shiv.js │ │ └── respond.js │ │ ├── imgcutter │ │ ├── zui.imgcutter.css │ │ ├── zui.imgcutter.js │ │ ├── zui.imgcutter.min.css │ │ └── zui.imgcutter.min.js │ │ ├── jquery │ │ └── jquery.js │ │ ├── kindeditor │ │ ├── kindeditor.css │ │ ├── kindeditor.js │ │ ├── kindeditor.min.css │ │ ├── kindeditor.min.js │ │ ├── lang │ │ │ ├── en.js │ │ │ ├── zh_CN.js │ │ │ └── zh_TW.js │ │ └── themes │ │ │ └── default │ │ │ ├── default.css │ │ │ ├── default.png │ │ │ ├── default.psd │ │ │ └── gray.png │ │ ├── migrate │ │ ├── migrate1.2.js │ │ └── migrate1.2.min.js │ │ └── prettify │ │ ├── lang-apollo.js │ │ ├── lang-basic.js │ │ ├── lang-clj.js │ │ ├── lang-css.js │ │ ├── lang-dart.js │ │ ├── lang-erlang.js │ │ ├── lang-go.js │ │ ├── lang-hs.js │ │ ├── lang-lisp.js │ │ ├── lang-llvm.js │ │ ├── lang-lua.js │ │ ├── lang-matlab.js │ │ ├── lang-ml.js │ │ ├── lang-mumps.js │ │ ├── lang-n.js │ │ ├── lang-pascal.js │ │ ├── lang-proto.js │ │ ├── lang-r.js │ │ ├── lang-rd.js │ │ ├── lang-scala.js │ │ ├── lang-sql.js │ │ ├── lang-tcl.js │ │ ├── lang-tex.js │ │ ├── lang-vb.js │ │ ├── lang-vhdl.js │ │ ├── lang-wiki.js │ │ ├── lang-xq.js │ │ ├── lang-yaml.js │ │ ├── prettify.css │ │ ├── prettify.js │ │ └── run_prettify.js └── web.config ├── readme.md ├── resources ├── assets │ └── sass │ │ └── app.scss ├── lang │ ├── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ └── zh_cn │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── admin │ ├── errors │ │ └── 403.blade.php │ ├── index │ │ └── index.blade.php │ ├── layouts │ │ ├── base.blade.php │ │ └── nav.blade.php │ ├── permission │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── role │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── show.blade.php │ └── user │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── group.blade.php │ │ └── index.blade.php │ ├── auth │ ├── emails │ │ └── password.blade.php │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ └── register.blade.php │ ├── errors │ └── 503.blade.php │ ├── layouts │ ├── app.blade.php │ ├── empty.blade.php │ └── errors.blade.php │ ├── vendor │ └── .gitkeep │ └── welcome.blade.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── ExampleTest.php └── TestCase.php └── yarn-error.log /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | APP_URL=http://localhost 5 | 6 | DB_CONNECTION=mysql 7 | DB_HOST=127.0.0.1 8 | DB_PORT=3306 9 | DB_DATABASE=homestead 10 | DB_USERNAME=homestead 11 | DB_PASSWORD=secret 12 | 13 | CACHE_DRIVER=file 14 | SESSION_DRIVER=file 15 | QUEUE_DRIVER=sync 16 | 17 | REDIS_HOST=127.0.0.1 18 | REDIS_PASSWORD=null 19 | REDIS_PORT=6379 20 | 21 | MAIL_DRIVER=smtp 22 | MAIL_HOST=mailtrap.io 23 | MAIL_PORT=2525 24 | MAIL_USERNAME=null 25 | MAIL_PASSWORD=null 26 | MAIL_ENCRYPTION=null 27 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /node_modules 3 | /public/storage 4 | Homestead.yaml 5 | Homestead.json 6 | .env 7 | .idea 8 | .git -------------------------------------------------------------------------------- /app/Console/Commands/Inspire.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 19 | } 20 | 21 | /** 22 | * Show the application dashboard. 23 | * 24 | * @return \Illuminate\Http\Response 25 | */ 26 | public function index() 27 | { 28 | return view('admin.index.index'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/RoleController.php: -------------------------------------------------------------------------------- 1 | paginate(20); 24 | 25 | return view('admin.role.index',compact('data')); 26 | } 27 | 28 | /** 29 | * Show the form for creating a new resource. 30 | * 31 | * @return \Illuminate\Http\Response 32 | */ 33 | public function create() 34 | { 35 | $onload[] = sprintf("admin.highlight_subnav('%s')",route('admin.role.index')); // 默认左侧菜单高亮函数 36 | return view('admin.role.create',compact('onload')); 37 | } 38 | 39 | /** 40 | * Store a newly created resource in storage. 41 | * 42 | * @param \Illuminate\Http\Request $request 43 | * @return \Illuminate\Http\Response 44 | */ 45 | public function store(RoleRequest $request) 46 | { 47 | if($request->isMethod('post')){ 48 | $input = $request->except(['_token']); 49 | 50 | $res = Role::insert($input); 51 | if($res){ 52 | return redirect(route('admin.role.index')); 53 | }else{ 54 | return back()->with('errors','数据提交失败,请稍后重试!'); 55 | } 56 | } 57 | } 58 | 59 | /** 60 | * Display the specified resource. 61 | * 查看角色组拥有的权限 62 | * @param int $id 63 | * @return \Illuminate\Http\Response 64 | */ 65 | public function show(Role $role) 66 | { 67 | $permissions = Permission::permissionsTree(); // 获取所有存在的权限 68 | 69 | // 通过多对多获取当前用户组所拥有权限 70 | $this_role_permissions = $role->permissions()->get(['id'])->toArray(); 71 | 72 | $thisPermissionArray = []; // 当前用户所有权限集合 73 | foreach($this_role_permissions as $permission){ 74 | $thisPermissionArray[] = $permission['id']; 75 | } 76 | 77 | $thisPermissionArray = Json::encode($thisPermissionArray); 78 | 79 | $onload[] = sprintf("admin.highlight_subnav('%s')",route('admin.role.index')); // 默认左侧菜单高亮函数 80 | return view('admin.role.show',compact('role','permissions','thisPermissionArray','onload')); 81 | } 82 | 83 | /** 84 | * 编辑用户组权限操作 85 | */ 86 | public function editPersissionToRole(Request $request ,Role $role) 87 | { 88 | $input = $request->except('_token'); 89 | 90 | $res = $role->perms()->sync($input['permission_id']); 91 | 92 | if($res){ 93 | return redirect(route('admin.role.show',$role->id)); 94 | }else{ 95 | return back()->with('errors','数据提交失败,请稍后重试!'); 96 | } 97 | 98 | } 99 | /** 100 | * Show the form for editing the specified resource. 101 | * @param Role $role 102 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View 103 | */ 104 | public function edit(Role $role) 105 | { 106 | $onload[] = sprintf("admin.highlight_subnav('%s')",route('admin.role.index')); // 默认左侧菜单高亮函数 107 | return view('admin.role.edit',compact('role','onload')); 108 | } 109 | 110 | /** 111 | * Update the specified resource in storage. 112 | * 113 | * @param \Illuminate\Http\Request $request 114 | * @param int $id 115 | * @return \Illuminate\Http\Response 116 | */ 117 | public function update(RoleRequest $request,$id) 118 | { 119 | $input = $request->except(['_token','_method']); 120 | $res = Role::where('id',$id)->update($input); 121 | if($res){ 122 | return redirect(route('admin.role.index')); 123 | }else{ 124 | return back()->with('errors','数据提交失败,请稍后重试!'); 125 | } 126 | } 127 | 128 | /** 129 | * Remove the specified resource from storage. 130 | * 131 | * @param int $id 132 | * @return \Illuminate\Http\Response 133 | */ 134 | public function destroy($id) 135 | { 136 | // 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/AuthController.php: -------------------------------------------------------------------------------- 1 | middleware($this->guestMiddleware(), ['except' => 'logout']); 41 | } 42 | 43 | /** 44 | * Get a validator for an incoming registration request. 45 | * 46 | * @param array $data 47 | * @return \Illuminate\Contracts\Validation\Validator 48 | */ 49 | protected function validator(array $data) 50 | { 51 | return Validator::make($data, [ 52 | 'name' => 'required|max:255', 53 | 'email' => 'required|email|max:255|unique:users', 54 | 'password' => 'required|min:6|confirmed', 55 | ]); 56 | } 57 | 58 | /** 59 | * Create a new user instance after a valid registration. 60 | * 61 | * @param array $data 62 | * @return User 63 | */ 64 | protected function create(array $data) 65 | { 66 | return User::create([ 67 | 'name' => $data['name'], 68 | 'email' => $data['email'], 69 | 'password' => bcrypt($data['password']), 70 | ]); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/PasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | [ 27 | \App\Http\Middleware\EncryptCookies::class, 28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 29 | \Illuminate\Session\Middleware\StartSession::class, 30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 31 | \App\Http\Middleware\VerifyCsrfToken::class, 32 | ], 33 | 34 | 'api' => [ 35 | 'throttle:60,1', 36 | ], 37 | ]; 38 | 39 | /** 40 | * The application's route middleware. 41 | * 42 | * These middleware may be assigned to groups or used individually. 43 | * 44 | * @var array 45 | */ 46 | protected $routeMiddleware = [ 47 | 'auth' => \App\Http\Middleware\Authenticate::class, 48 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 49 | 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class, 50 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 51 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 52 | /** 53 | * 权限验证 54 | */ 55 | 'role' => \Zizaco\Entrust\Middleware\EntrustRole::class, 56 | /*'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class, 57 | 'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,*/ 58 | 59 | /** 60 | * 自定义权限验证 61 | */ 62 | 'role.base' => \App\Http\Middleware\RoleBase::class, // 基础的验证 63 | 'role.auth' => \App\Http\Middleware\RoleAuth::class, // 权限验证 64 | 'role.menu' =>\App\Http\Middleware\RoleMenu::class, // 后台菜单 65 | ]; 66 | } 67 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | guest()) { 21 | if ($request->ajax() || $request->wantsJson()) { 22 | return response('Unauthorized.', 401); 23 | } else { 24 | return redirect()->guest('login'); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/RoleAuth.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 22 | } 23 | 24 | /** 25 | * Handle an incoming request. 26 | * 27 | * @param \Illuminate\Http\Request $request 28 | * @param \Closure $next 29 | * @return mixed 30 | */ 31 | public function handle($request, Closure $next) 32 | { 33 | 34 | // echo Route::currentRouteName(); // 当前路由别名 35 | 36 | //查找并拼接出地址的别名值 37 | // dd($action = $request->route()->getAction()); // 获取当前请求的路由信息 38 | 39 | 40 | $guest = $this->auth->guest(); // 判断当前用户是否登录 41 | if($guest){ 42 | if ($request->ajax() || $request->wantsJson()) { 43 | return response('Unauthorized.', 401); 44 | } else { 45 | return redirect()->guest('login'); 46 | } 47 | } 48 | 49 | 50 | if(!IS_ROOT){ // 超管不受限制 51 | 52 | $currRouteName = Route::currentRouteName(); // 当前路由别名 53 | $previousUrl = URL::previous(); // 用户访问的上一页 54 | 55 | if(!$this->auth->user()->can($currRouteName) ){ // 如果是游客或者没有权限跳转到首页 56 | if($request->ajax() && ($request->getMethod() != 'GET')) { 57 | return response()->json([ 58 | 'status' => -1, 59 | 'code' => 403, 60 | 'msg' => '您没有权限执行此操作' 61 | ]); 62 | } else { 63 | return response()->view('admin.errors.403', compact('previousUrl')); 64 | } 65 | } 66 | } 67 | 68 | return $next($request); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/Http/Middleware/RoleBase.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 21 | } 22 | /** 23 | * Handle an incoming request. 24 | * 25 | * @param \Illuminate\Http\Request $request 26 | * @param \Closure $next 27 | * @return mixed 28 | */ 29 | public function handle($request, Closure $next) 30 | { 31 | // 登录检测 32 | if($this->auth->guest()){ 33 | return redirect()->guest('login'); 34 | } 35 | // 定义超级管理员常量 36 | define('IS_ROOT',Role::isAdministrator()); 37 | 38 | return $next($request); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Middleware/RoleMenu.php: -------------------------------------------------------------------------------- 1 | share('menuList',Permission::getMenu()); // 变量共享 25 | 26 | return $next($request); 27 | } 28 | 29 | 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | isMethod('post')){ 28 | $rules = [ 29 | 'name' => 'required|unique:permissions', 30 | 'display_name' => 'required', 31 | ]; 32 | } 33 | return $rules; 34 | } 35 | 36 | /** 37 | * @return array 38 | */ 39 | public function messages() 40 | { 41 | return [ 42 | 'name.required' => '权限英文名必须填写!', 43 | 'name.unique' => '权限英文名被占用', 44 | 45 | 'display_name.required' => '权限中文名必须填写!', 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Http/Requests/CreateUserRequest.php: -------------------------------------------------------------------------------- 1 | isMethod('post')){ 28 | $rules = [ 29 | 'name' => 'required|unique:users|max:20', 30 | 'email' => 'email|unique:users|max:40', 31 | 'password' => 'required|confirmed' 32 | ]; 33 | } 34 | return $rules; 35 | } 36 | 37 | /** 38 | * @return array 39 | */ 40 | public function messages() 41 | { 42 | return [ 43 | 'name.required' => '用户名必须填写!', 44 | 'name.unique' => '用户名被占用', 45 | 'name.max' => '用户名不应该超过20个字符!', 46 | 47 | 'email.email' => '邮箱填写格式有误!', 48 | 'email.unique' => '邮箱被占用', 49 | 'email.max' => '用户名不应该超过40个字符!', 50 | 51 | 'password.required' => '密码必须填写!', 52 | 'password.confirmed'=>'两次输入密码不一致!' 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/Http/Requests/EditPermissionRequest.php: -------------------------------------------------------------------------------- 1 | isMethod('post')){ 28 | $rules = [ 29 | 'name' => 'required', 30 | 'display_name' => 'required', 31 | ]; 32 | } 33 | return $rules; 34 | } 35 | 36 | /** 37 | * @return array 38 | */ 39 | public function messages() 40 | { 41 | return [ 42 | 'name.required' => '权限英文名必须填写!', 43 | 44 | 'display_name.required' => '权限中文名必须填写!', 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Http/Requests/EditUserRequest.php: -------------------------------------------------------------------------------- 1 | isMethod('post')){ 28 | $rules = [ 29 | 'password' => 'required|confirmed' 30 | ]; 31 | } 32 | return $rules; 33 | } 34 | 35 | /** 36 | * @return array 37 | */ 38 | public function messages() 39 | { 40 | return [ 41 | 'password.required' => '密码必须填写!', 42 | 'password.confirmed'=>'两次输入密码不一致!' 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/Http/Requests/Request.php: -------------------------------------------------------------------------------- 1 | isMethod('post')){ 28 | $rules = [ 29 | 'name' => 'required|unique:roles|max:20', 30 | 'display_name' => 'required|max:20', 31 | ]; 32 | } 33 | return $rules; 34 | } 35 | 36 | /** 37 | * @return array 38 | */ 39 | public function messages() 40 | { 41 | return [ 42 | 'name.required' => '角色英文名必须填写!', 43 | 'name.unique' => '角色英文名被占用', 44 | 'name.max' => '角色英文名不应该超过20个字符!', 45 | 46 | 'display_name.required' => '角色中文名必须填写!', 47 | 'display_name.max' => '角色中文名不应该超过20个字符!' 48 | 49 | ]; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/Http/routes.php: -------------------------------------------------------------------------------- 1 | 'admin','middleware'=>['role.base','role.menu','role.auth'],'namespace'=>'Admin'],function(){ 23 | 24 | Route::get('index', [ 25 | 'as'=>'admin.index.index', 26 | 'uses'=>'IndexController@index' 27 | ]); // 后台首页 28 | 29 | Route::resource('user','UserController'); 30 | Route::get('user/getGroup/{user}',[ 31 | 'as'=>'admin.user.getGroup', 32 | 'uses'=>'UserController@getGroup' 33 | ]); 34 | Route::post('user/postGroup/{user}',[ 35 | 'as'=>'admin.user.postGroup', 36 | 'uses'=>'UserController@postGroup' 37 | ]); 38 | /*Route::get('user',[ 39 | 'as'=>'admin.user.index', 40 | 'uses'=>'UserController@index' 41 | ]);*/ 42 | 43 | Route::resource('role','RoleController'); 44 | Route::post('role/editPersissionToRole/{role}',[ 45 | 'as'=>'admin.role.editPersissionToRole', 46 | 'uses'=>'RoleController@editPersissionToRole' 47 | ]); 48 | 49 | Route::resource('permission','PermissionController'); 50 | Route::get('permission/create/{id?}',[ 51 | 'as'=>'admin.permission.getCreate', 52 | 'uses'=>'PermissionController@create' 53 | ]); 54 | Route::get('permission/index/{id?}',[ 55 | 'as'=>'admin.permission.getIndex', 56 | 'uses'=>'PermissionController@index', 57 | 'id'=>'{parent_id}' 58 | ]); 59 | }); 60 | -------------------------------------------------------------------------------- /app/Jobs/Job.php: -------------------------------------------------------------------------------- 1 | status){ 29 | case 1; 30 | $status = 'success'; 31 | $typestr = '正常'; 32 | break; 33 | case 0 ; 34 | $status = 'error'; 35 | $typestr = '禁用'; 36 | break; 37 | } 38 | return sprintf('',$status,$typestr); 39 | } 40 | 41 | // 定义用户组和角色的多对多关系 42 | public function roles(){ 43 | // return $this->belongstomany(role::class,'role_user','user_id','role_id'); 44 | return $this->belongstomany(role::class); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Permission.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any application authentication / authorization services. 21 | * 22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate 23 | * @return void 24 | */ 25 | public function boot(GateContract $gate) 26 | { 27 | $this->registerPolicies($gate); 28 | 29 | // 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any other events for your application. 23 | * 24 | * @param \Illuminate\Contracts\Events\Dispatcher $events 25 | * @return void 26 | */ 27 | public function boot(DispatcherContract $events) 28 | { 29 | parent::boot($events); 30 | 31 | // 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapWebRoutes($router); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @param \Illuminate\Routing\Router $router 51 | * @return void 52 | */ 53 | protected function mapWebRoutes(Router $router) 54 | { 55 | $router->group([ 56 | 'namespace' => $this->namespace, 'middleware' => 'web', 57 | ], function ($router) { 58 | require app_path('Http/routes.php'); 59 | }); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Role.php: -------------------------------------------------------------------------------- 1 | belongsToMany(Permission::class,'permission_role','role_id','permission_id'); 12 | } 13 | 14 | /** 15 | * 是否是超级管理员,超级管理员不受权限控制 16 | */ 17 | protected static function isAdministrator($uid = null){ 18 | 19 | $uid = is_null($uid) ? request()->user()->getAuthIdentifier() : $uid; // 当前登录者id 20 | return $uid && ($uid === 1); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | status){ 42 | case 1; 43 | $status = 'success'; 44 | $typestr = '正常'; 45 | break; 46 | case 0 ; 47 | $status = 'error'; 48 | $typestr = '禁用'; 49 | break; 50 | } 51 | return sprintf('',$status,$typestr); 52 | } 53 | 54 | // 定义用户组和角色的多对多关系 55 | public function roles(){ 56 | // return $this->belongstomany(role::class,'role_user','user_id','role_id'); 57 | return $this->belongstomany(role::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | =5.5.9", 9 | "laravel/framework": "5.2.*", 10 | "zizaco/entrust": "5.2.x-dev", 11 | "laravelcollective/html": "5.2.*", 12 | "baum/baum": "~1.1" 13 | }, 14 | "require-dev": { 15 | "fzaninotto/faker": "~1.4", 16 | "mockery/mockery": "0.9.*", 17 | "phpunit/phpunit": "~4.0", 18 | "symfony/css-selector": "2.8.*|3.0.*", 19 | "symfony/dom-crawler": "2.8.*|3.0.*" 20 | }, 21 | "autoload": { 22 | "classmap": [ 23 | "database" 24 | ], 25 | "psr-4": { 26 | "App\\": "app/" 27 | } 28 | }, 29 | "autoload-dev": { 30 | "classmap": [ 31 | "tests/TestCase.php" 32 | ] 33 | }, 34 | "scripts": { 35 | "post-root-package-install": [ 36 | "php -r \"copy('.env.example', '.env');\"" 37 | ], 38 | "post-create-project-cmd": [ 39 | "php artisan key:generate" 40 | ], 41 | "post-install-cmd": [ 42 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 43 | "php artisan optimize" 44 | ], 45 | "post-update-cmd": [ 46 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 47 | "php artisan optimize" 48 | ] 49 | }, 50 | "config": { 51 | "preferred-install": "dist" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | Here you may set the options for resetting passwords including the view 85 | | that is your password reset e-mail. You may also set the name of the 86 | | table that maintains all of the reset tokens for your application. 87 | | 88 | | You may specify multiple password reset configurations if you have more 89 | | than one user table or model in the application and you want to have 90 | | separate password reset settings based on the specific user types. 91 | | 92 | | The expire time is the number of minutes that the reset token should be 93 | | considered valid. This security feature keeps tokens short-lived so 94 | | they have less time to be guessed. You may change this as needed. 95 | | 96 | */ 97 | 98 | 'passwords' => [ 99 | 'users' => [ 100 | 'provider' => 'users', 101 | 'email' => 'auth.emails.password', 102 | 'table' => 'password_resets', 103 | 'expire' => 60, 104 | ], 105 | ], 106 | 107 | ]; 108 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'pusher'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Broadcast Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the broadcast connections that will be used 24 | | to broadcast events to other systems or over websockets. Samples of 25 | | each available type of connection are provided inside this array. 26 | | 27 | */ 28 | 29 | 'connections' => [ 30 | 31 | 'pusher' => [ 32 | 'driver' => 'pusher', 33 | 'key' => env('PUSHER_KEY'), 34 | 'secret' => env('PUSHER_SECRET'), 35 | 'app_id' => env('PUSHER_APP_ID'), 36 | 'options' => [ 37 | // 38 | ], 39 | ], 40 | 41 | 'redis' => [ 42 | 'driver' => 'redis', 43 | 'connection' => 'default', 44 | ], 45 | 46 | 'log' => [ 47 | 'driver' => 'log', 48 | ], 49 | 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc', 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array', 37 | ], 38 | 39 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path('framework/cache'), 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 55 | 'port' => env('MEMCACHED_PORT', 11211), 56 | 'weight' => 100, 57 | ], 58 | ], 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | ], 65 | 66 | ], 67 | 68 | /* 69 | |-------------------------------------------------------------------------- 70 | | Cache Key Prefix 71 | |-------------------------------------------------------------------------- 72 | | 73 | | When utilizing a RAM based store such as APC or Memcached, there might 74 | | be other applications utilizing the same cache. So, we'll specify a 75 | | value to get prefixed to all our keys so we can avoid collisions. 76 | | 77 | */ 78 | 79 | 'prefix' => 'laravel', 80 | 81 | ]; 82 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'visibility' => 'public', 55 | ], 56 | 57 | 's3' => [ 58 | 'driver' => 's3', 59 | 'key' => 'your-key', 60 | 'secret' => 'your-secret', 61 | 'region' => 'your-region', 62 | 'bucket' => 'your-bucket', 63 | ], 64 | 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/menu.php: -------------------------------------------------------------------------------- 1 | [ 6 | 1 => '用户管理' 7 | ] 8 | ]; -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'expire' => 60, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'ttr' => 60, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'expire' => 60, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->safeEmail, 18 | 'password' => bcrypt(str_random(10)), 19 | 'remember_token' => str_random(10), 20 | ]; 21 | }); 22 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->char('name',20)->comment('用户名'); 18 | $table->string('email',40)->unique()->comment('用户邮箱'); 19 | $table->char('password',60)->comment('用户密码'); 20 | $table->rememberToken()->comment('token'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('users'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index()->comment('待验证的邮箱'); 17 | $table->string('token')->index()->comment('token验证标志'); 18 | $table->timestamp('created_at'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_06_29_092226_add_some_cloumns_to_users.php: -------------------------------------------------------------------------------- 1 | char('real_name',10)->comment('用户真实姓名')->after('name'); 17 | $table->tinyInteger('status')->default('1')->comment('用户状态 -1禁用 0删除 1正常')->after('email'); 18 | $table->tinyInteger('gender')->default('1')->comment('用户性别 0不限 1男 2女')->after('status'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('users', function (Blueprint $table) { 30 | $table->dropColumn('real_name'); 31 | $table->dropColumn('status'); 32 | $table->dropColumn('gender'); 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2016_06_29_151412_entrust_setup_tables.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('角色ID'); 17 | $table->string('name',20)->unique()->comment('角色英文名称'); 18 | $table->char('display_name',20)->nullable()->comment('角色中文名称'); 19 | $table->string('description',180)->nullable()->comment('角色简要描述'); 20 | $table->timestamps(); 21 | }); 22 | 23 | // Create table for associating roles to users (Many-to-Many) 24 | Schema::create('role_user', function (Blueprint $table) { 25 | $table->integer('user_id')->unsigned()->comment('用户id,关联users表'); 26 | $table->integer('role_id')->unsigned()->comment('角色id,关联roles表'); 27 | 28 | $table->foreign('user_id')->references('id')->on('users') 29 | ->onUpdate('cascade')->onDelete('cascade'); 30 | $table->foreign('role_id')->references('id')->on('roles') 31 | ->onUpdate('cascade')->onDelete('cascade'); 32 | 33 | $table->primary(['user_id', 'role_id']); 34 | }); 35 | 36 | // Create table for storing permissions 37 | Schema::create('permissions', function (Blueprint $table) { 38 | $table->increments('id')->comment('权限id'); 39 | $table->string('name')->unique()->comment('权限英文名称'); 40 | $table->integer('parent_id')->nullable()->index()->comment('上级分类'); 41 | $table->tinyInteger('is_menu')->default(0)->unsigned()->comment('是否为菜单'); 42 | $table->smallInteger('sort')->default(0)->unsigned()->comment('排序'); 43 | $table->string('display_name')->default('')->comment('权限中文名称'); 44 | $table->string('description')->default('')->comment('权限相关描述'); 45 | $table->integer('left')->nullable()->index()->comment('左索引'); 46 | $table->integer('right')->nullable()->index()->comment('右索引'); 47 | $table->integer('depth')->nullable()->comment('深度值'); 48 | $table->timestamps(); 49 | }); 50 | 51 | // Create table for associating permissions to roles (Many-to-Many) 52 | Schema::create('permission_role', function (Blueprint $table) { 53 | $table->integer('permission_id')->unsigned()->comment('权限id'); 54 | $table->integer('role_id')->unsigned()->comment('角色id'); 55 | 56 | $table->foreign('permission_id')->references('id')->on('permissions') 57 | ->onUpdate('cascade')->onDelete('cascade'); 58 | $table->foreign('role_id')->references('id')->on('roles') 59 | ->onUpdate('cascade')->onDelete('cascade'); 60 | 61 | $table->primary(['permission_id', 'role_id']); 62 | }); 63 | } 64 | 65 | /** 66 | * Reverse the migrations. 67 | * 68 | * @return void 69 | */ 70 | public function down() 71 | { 72 | Schema::drop('permission_role'); 73 | Schema::drop('permissions'); 74 | Schema::drop('role_user'); 75 | Schema::drop('roles'); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /database/migrations/2016_07_03_152707_add_group_to_permissions.php: -------------------------------------------------------------------------------- 1 | tinyInteger('group')->unsigned()->default(0)->comment('菜单分组')->after('display_name'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() 26 | { 27 | Schema::table('permissions', function (Blueprint $table) { 28 | $table->dropColumn('group'); 29 | }); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(RbacSeeder::class); 15 | $this->call(UsersTableSeeder::class); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /database/seeds/RbacSeeder.php: -------------------------------------------------------------------------------- 1 | get(base_path('database/seeds') . '/' . 'rbac.sql'); 17 | DB::connection()->getPdo()->exec($database); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 16 | 'id' => 1, 17 | 'name'=> 'admin', 18 | 'real_name'=> '管理员', 19 | 'email'=> 'admin@admin.com', 20 | 'status'=> 1, 21 | 'gender'=> 1, 22 | 'password'=> Hash::make('aaaaaa'), 23 | 'created_at'=>date('Y-m-d H:i:s'), 24 | 'updated_at'=>date('Y-m-d H:i:s') 25 | ]); // 写入超级管理员 26 | DB::table('users')->insert([ 27 | 'id' => 2, 28 | 'name'=> 'test', 29 | 'real_name'=> '测试帐号', 30 | 'email'=> 'test@admin.com', 31 | 'status'=> 1, 32 | 'gender'=> 1, 33 | 'password'=> Hash::make('aaaaaa'), 34 | 'created_at'=>date('Y-m-d H:i:s'), 35 | 'updated_at'=>date('Y-m-d H:i:s') 36 | ]); // 写入测试用户 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Elixir Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for our application, as well as publishing vendor resources. 11 | | 12 | */ 13 | 14 | elixir(function(mix) { 15 | mix.sass('app.scss'); 16 | }); 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "prod": "gulp --production", 5 | "dev": "gulp watch" 6 | }, 7 | "devDependencies": { 8 | "gulp": "^3.9.1", 9 | "laravel-elixir": "^5.0.0", 10 | "bootstrap-sass": "^3.0.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | ./app/Http/routes.php 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels nice to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/static/admin/css/public.css: -------------------------------------------------------------------------------- 1 | body{padding-top: 60px;padding-bottom: 60px;background: #fff;} 2 | .row-main {padding: 0 10px;} 3 | .leftmenu{width:100%;margin-bottom: 20px;} 4 | .leftmenu.affix{position: relative;top: 0px} 5 | 6 | /*列表分页样式*/ 7 | .pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; } 8 | .pagination > li { display: inline; } 9 | .pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 5px 12px; margin-left: -1px; line-height: 1.53846154; text-decoration: none; background-color: #fff; border: 1px solid #ddd; -webkit-transition: all .2s cubic-bezier(.175, .885, .32, 1); transition: all .2s cubic-bezier(.175, .885, .32, 1); } 10 | .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } 11 | .pagination > li:last-child > a, 12 | .pagination > li:last-child > span { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } 13 | .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { background-color: #e5e5e5; } 14 | .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover { z-index: 2; color: #fff; cursor: default; background-color: #3280fc; } 15 | .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #ddd; cursor: not-allowed; background-color: #fff; border-color: #ddd; } 16 | .pagination-justify { display: block; } 17 | .pagination-justify:before, .pagination-justify:after { /* 1 */ display: table; content: " "; /* 2 */ } 18 | .pagination-justify:after { clear: both; } 19 | .pagination-justify:before, .pagination-justify:after { /* 1 */ display: table; content: " "; /* 2 */ } 20 | .pagination-justify:after { clear: both; } 21 | .pagination-justify .next > a, .pagination-justify .next > span { float: right; } 22 | .pagination-justify .previous > a, .pagination-justify .previous > span { float: left; } 23 | .pagination-lg > li > a, .pagination-lg > li > span { padding: 10px 16px; font-size: 17px; } 24 | .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } 25 | .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { border-top-right-radius: 6px; border-bottom-right-radius: 6px; } 26 | .pagination-sm > li > a, .pagination-sm > li > span { padding: 2px 8px; font-size: 12px; } 27 | .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { border-top-left-radius: 3px; border-bottom-left-radius: 3px; } 28 | .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } 29 | .pagination-pills > li:first-child > a, .pagination-pills > li:first-child > span { border-radius: 16px 0 0 16px; } 30 | .pagination-pills > li:last-child > a, .pagination-pills > li:last-child > span { border-radius: 0 16px 16px 0; } 31 | .pagination-pills.pagination-justify > li > a, .pagination-pills.pagination-justify > li > span { border-radius: 16px; } 32 | .pagination-loose { display: block; margin: 20px 0; } 33 | .pagination-loose:before, .pagination-loose:after { /* 1 */ display: table; content: " "; /* 2 */ } 34 | .pagination-loose:after { clear: both; } 35 | .pagination-loose:before, .pagination-loose:after { /* 1 */ display: table; content: " "; /* 2 */ } 36 | .pagination-loose:after {clear: both; } 37 | .pagination-loose.pagination-pills > li > a, .pagination-loose.pagination-pills > li > span { border-radius: 16px; } 38 | .pagination-loose > li > a, .pagination-loose > li > span { margin-left: 5px; } 39 | .pagination-loose > li:first-child > a, .pagination-loose > li:first-child > span { margin-left: 0; } 40 | 41 | /*授权页面样式*/ 42 | #permissionsList .panel-group {margin-bottom: 15px;} 43 | #permissionsList .panel-body {padding: 0px 15px 5px 15px;} 44 | #permissionsList .panel-body .checkbox{margin-right: 10px} 45 | #permissionsList .panel-body .rule_check div{margin:5px 0;} 46 | #permissionsList .panel-body .divsion{margin-right: 20px;} -------------------------------------------------------------------------------- /public/static/admin/images/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/01.jpg -------------------------------------------------------------------------------- /public/static/admin/images/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/02.jpg -------------------------------------------------------------------------------- /public/static/admin/images/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/03.jpg -------------------------------------------------------------------------------- /public/static/admin/images/bg_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/bg_icon.png -------------------------------------------------------------------------------- /public/static/admin/images/forbidden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/forbidden.jpg -------------------------------------------------------------------------------- /public/static/admin/images/ico-tips.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/ico-tips.gif -------------------------------------------------------------------------------- /public/static/admin/images/ico-tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/ico-tips.png -------------------------------------------------------------------------------- /public/static/admin/images/tab_sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/images/tab_sign.png -------------------------------------------------------------------------------- /public/static/admin/js/admin.js: -------------------------------------------------------------------------------- 1 | var admin = {}; 2 | 3 | // 高亮显示左侧二级菜单 4 | admin.highlight_subnav = function (url) { 5 | $('.leftmenu').find('a[href="'+url+'"]').closest('li').addClass("active").parent().css({'display':'block'}).parent().addClass('show').find(".nav-parent-fold-icon").addClass("icon-rotate-90"); 6 | } 7 | 8 | // 设置表单的默认值 9 | function setValue(name, value){ 10 | var first = name.substr(0,1), input, i = 0, val; 11 | if(value === "") return; 12 | if("#" === first || "." === first){ 13 | input = $(name); 14 | } else { 15 | input = $("[name='" + name + "']"); 16 | } 17 | 18 | if(input.eq(0).is(":radio")) { // 单选按钮 19 | input.filter("[value='" + value + "']").each(function(){this.checked = true}); 20 | } else if(input.eq(0).is(":checkbox")) { // 复选框 21 | if(!$.isArray(value)){ 22 | val = new Array(); 23 | val[0] = value; 24 | } else { 25 | val = value; 26 | } 27 | for(i = 0, len = val.length; i < len; i++){ 28 | input.filter("[value='" + val[i] + "']").each(function(){this.checked = true}); 29 | } 30 | } else { // 其他表单选项直接设置值 31 | input.val(value); 32 | } 33 | } -------------------------------------------------------------------------------- /public/static/admin/zui/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/zui/.DS_Store -------------------------------------------------------------------------------- /public/static/admin/zui/fonts/zenicon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/zui/fonts/zenicon.eot -------------------------------------------------------------------------------- /public/static/admin/zui/fonts/zenicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/zui/fonts/zenicon.ttf -------------------------------------------------------------------------------- /public/static/admin/zui/fonts/zenicon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/zui/fonts/zenicon.woff -------------------------------------------------------------------------------- /public/static/admin/zui/lib/board/zui.board.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | .board-item { 9 | padding: 6px 10px; 10 | margin-bottom: 5px; 11 | background: #fff; 12 | border: 1px solid #ddd; 13 | box-shadow: 0 1px 0 rgba(0, 0, 0, .05); 14 | -webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1); 15 | transition: all .4s cubic-bezier(.175, .885, .32, 1); 16 | } 17 | .board-item:hover { 18 | box-shadow: 0 1px 1 rgba(0, 0, 0, .1); 19 | } 20 | .board-item.board-item-empty { 21 | display: none; 22 | color: #808080; 23 | border-style: dashed; 24 | } 25 | .board-item.board-item-shadow { 26 | display: none; 27 | padding: 0; 28 | background: #ddd; 29 | border: none; 30 | border-color: #ddd; 31 | box-shadow: inset 0 0 4px rgba(0, 0, 0, .1); 32 | -webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1); 33 | transition: all .4s cubic-bezier(.175, .885, .32, 1); 34 | } 35 | .board-item.drag-shadow { 36 | width: 250px; 37 | cursor: move; 38 | background-color: #fff; 39 | border-color: #c4c4c4; 40 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .25); 41 | opacity: .9; 42 | } 43 | .board-item.drag-from { 44 | background-color: #ebf2f9; 45 | } 46 | .board-list .board-item:last-child { 47 | margin-bottom: 0; 48 | } 49 | .board { 50 | float: left; 51 | width: 250px; 52 | margin-right: 10px; 53 | } 54 | .board.drop-in-empty .board-item-empty { 55 | height: 0; 56 | padding: 0; 57 | margin: 0; 58 | overflow: hidden; 59 | border: transparent; 60 | } 61 | .board:last-child { 62 | margin-right: 0; 63 | } 64 | .board > .panel-body { 65 | padding: 5px; 66 | background: #f1f1f1; 67 | } 68 | .boards:before, 69 | .boards:after { 70 | /* 1 */ 71 | display: table; 72 | content: " "; 73 | /* 2 */ 74 | } 75 | .boards:after { 76 | clear: both; 77 | } 78 | .boards.dragging .board.drop-in { 79 | border-color: #c4c4c4; 80 | box-shadow: 1px 1px 15px rgba(0, 0, 0, .25); 81 | } 82 | .boards.dragging .board.drop-in .board-item-shadow { 83 | display: block; 84 | } 85 | .boards.dragging .board .board-item.board-item-empty { 86 | display: block; 87 | } 88 | .boards.dragging .board-item.disable-drop { 89 | display: none; 90 | } 91 | .boards.drop-in .board-item.drag-from { 92 | height: 0; 93 | padding: 0; 94 | margin: 0; 95 | overflow: hidden; 96 | border: transparent; 97 | } 98 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/board/zui.board.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | /*! 9 | * ZUI - v1.4.0 - 2016-01-26 10 | * http://zui.sexy 11 | * GitHub: https://github.com/easysoft/zui.git 12 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 13 | */.board-item{padding:6px 10px;margin-bottom:5px;background:#fff;border:1px solid #ddd;box-shadow:0 1px 0 rgba(0,0,0,.05);-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.board-item:hover{box-shadow:0 1px 1 rgba(0,0,0,.1)}.board-item.board-item-empty{display:none;color:grey;border-style:dashed}.board-item.board-item-shadow{display:none;padding:0;background:#ddd;border:none;border-color:#ddd;box-shadow:inset 0 0 4px rgba(0,0,0,.1);-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.board-item.drag-shadow{width:250px;cursor:move;background-color:#fff;border-color:#c4c4c4;box-shadow:1px 1px 15px rgba(0,0,0,.25);opacity:.9}.board-item.drag-from{background-color:#ebf2f9}.board-list .board-item:last-child{margin-bottom:0}.board{float:left;width:250px;margin-right:10px}.board.drop-in-empty .board-item-empty{height:0;padding:0;margin:0;overflow:hidden;border:transparent}.board:last-child{margin-right:0}.board>.panel-body{padding:5px;background:#f1f1f1}.boards:after,.boards:before{display:table;content:" "}.boards:after{clear:both}.boards.dragging .board.drop-in{border-color:#c4c4c4;box-shadow:1px 1px 15px rgba(0,0,0,.25)}.boards.dragging .board.drop-in .board-item-shadow{display:block}.boards.dragging .board .board-item.board-item-empty{display:block}.boards.dragging .board-item.disable-drop{display:none}.boards.drop-in .board-item.drag-from{height:0;padding:0;margin:0;overflow:hidden;border:transparent} -------------------------------------------------------------------------------- /public/static/admin/zui/lib/board/zui.board.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | !function(t){"use strict";if(!t.fn.droppable)throw new Error("Droppable requires for boards");var o=function(o,i){this.$=t(o),this.options=this.getOptions(i),this.getLang(),this.init()};o.DEFAULTS={lang:"zh-cn",langs:{"zh-cn":{append2end:"移动到末尾"},"zh-tw":{append2end:"移动到末尾"},en:{append2end:"Move to the end."}}},o.prototype.getOptions=function(i){return i=t.extend({},o.DEFAULTS,this.$.data(),i)},o.prototype.getLang=function(){var i=window.config;if(!this.options.lang){if("undefined"!=typeof i&&i.clientLang)this.options.lang=i.clientLang;else{var n=t("html").attr("lang");this.options.lang=n?n:"en"}this.options.lang=this.options.lang.replace(/-/,"_").toLowerCase()}this.lang=this.options.langs[this.options.lang]||this.options.langs[o.DEFAULTS.lang]},o.prototype.init=function(){var o=1,i=this.lang;this.$.find('.board-item:not(".disable-drop"), .board:not(".disable-drop")').each(function(){var n=t(this);n.attr("id")?n.attr("data-id",n.attr("id")):n.attr("data-id")||n.attr("data-id","board"+o++),n.hasClass("board")&&n.find(".board-list").append('
{append2end}
'.format(i)).append('
'.format(i))}),this.bind()},o.prototype.bind=function(o){var i=this.$,n=this.options;"undefined"==typeof o&&(o=i.find('.board-item:not(".disable-drop, .board-item-shadow")')),o.droppable({before:n.before,target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,start:function(t){i.addClass("dragging").find(".board-item-shadow").height(t.element.outerHeight())},drag:function(t){if(i.find(".board.drop-in-empty").removeClass("drop-in-empty"),t.isIn){var o=t.target.closest(".board").addClass("drop-in"),n=o.find(".board-item-shadow"),a=t.target;i.addClass("drop-in").find(".board.drop-in").not(o).removeClass("drop-in"),n.insertBefore(a),o.toggleClass("drop-in-empty",a.hasClass("board-item-empty"))}},drop:function(o){if(o.isNew){var i,a="drop";n.hasOwnProperty(a)&&t.isFunction(n[a])&&(i=n[a](o)),i!==!1&&o.element.insertBefore(o.target)}},finish:function(){i.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}})},t.fn.boards=function(i){return this.each(function(){var n=t(this),a=n.data("zui.boards"),e="object"==typeof i&&i;a||n.data("zui.boards",a=new o(this,e)),"string"==typeof i&&a[i]()})},t.fn.boards.Constructor=o,t(function(){t('[data-toggle="boards"]').boards()})}(jQuery); -------------------------------------------------------------------------------- /public/static/admin/zui/lib/calendar/zui.calendar.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | .calendar { 9 | margin-bottom: 20px; 10 | } 11 | .calendar > header { 12 | margin-bottom: 10px; 13 | } 14 | .calendar > header .btn-toolbar > .btn-group { 15 | margin-right: 10px; 16 | } 17 | .calendar > header .calendar-caption { 18 | line-height: 30px; 19 | } 20 | .calendar .table { 21 | margin-bottom: 0; 22 | table-layout: fixed; 23 | } 24 | .calendar .table > thead > tr > th, 25 | .calendar .table > tbody > tr > td { 26 | width: 14.28571428571429%; 27 | padding: 0; 28 | } 29 | .calendar .table > thead > tr > th { 30 | color: #808080; 31 | text-align: center; 32 | background-color: #fff; 33 | } 34 | .calendar .day { 35 | opacity: .7; 36 | } 37 | .calendar .day > .heading { 38 | padding: 2px 5px; 39 | text-align: right; 40 | } 41 | .calendar .day > .heading > .month { 42 | padding: 1px 2px; 43 | color: #fff; 44 | background-color: #b3b3b3; 45 | border-radius: 3px; 46 | } 47 | .calendar .day > .content { 48 | height: 100%; 49 | min-height: 70px; 50 | } 51 | .calendar .day.drop-to { 52 | background-color: #fff0d5; 53 | opacity: 1; 54 | } 55 | .calendar .cell-day { 56 | background-color: #f1f1f1; 57 | } 58 | .calendar .cell-day.past > .day > .content { 59 | opacity: .7; 60 | } 61 | .calendar .cell-day.current-month { 62 | background: none; 63 | } 64 | .calendar .cell-day.current-month > .day { 65 | opacity: 1; 66 | } 67 | .calendar .cell-day.current { 68 | background-color: #fff0d5; 69 | box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #808080; 70 | } 71 | .calendar .cell-day.current > .day > .content { 72 | padding: 0; 73 | } 74 | .calendar .cell-day.current > .day > .heading { 75 | background-color: rgba(0, 0, 0, .1); 76 | } 77 | .calendar .event { 78 | padding: 1px 5px; 79 | margin: 0 1px 1px; 80 | color: #fff; 81 | cursor: pointer; 82 | background-color: #3280fc; 83 | opacity: .95; 84 | -webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1); 85 | transition: all .4s cubic-bezier(.175, .885, .32, 1); 86 | } 87 | a.calendar .event:hover { 88 | background-color: #0462f7; 89 | } 90 | .calendar .event:hover { 91 | opacity: 1; 92 | } 93 | .calendar .event.drag-shadow { 94 | cursor: move; 95 | } 96 | .calendar .event.drag-from { 97 | opacity: .25; 98 | } 99 | .calendar .event.color-red { 100 | color: #fff; 101 | background-color: #ea644a; 102 | } 103 | a.calendar .event.color-red:hover { 104 | background-color: #e53d1c; 105 | } 106 | .calendar .event.color-green { 107 | color: #fff; 108 | background-color: #38b03f; 109 | } 110 | a.calendar .event.color-green:hover { 111 | background-color: #2c8931; 112 | } 113 | .calendar .event.color-yellow { 114 | color: #fff; 115 | background-color: #f1a325; 116 | } 117 | a.calendar .event.color-yellow:hover { 118 | background-color: #d5890e; 119 | } 120 | .calendar .event.color-blue { 121 | color: #fff; 122 | background-color: #03b8cf; 123 | } 124 | a.calendar .event.color-blue:hover { 125 | background-color: #028b9d; 126 | } 127 | .calendar .event.color-brown { 128 | color: #fff; 129 | background-color: #bd7b46; 130 | } 131 | a.calendar .event.color-brown:hover { 132 | background-color: #996337; 133 | } 134 | .calendar .event.color-purple { 135 | color: #fff; 136 | background-color: #8666b8; 137 | } 138 | a.calendar .event.color-purple:hover { 139 | background-color: #6c4aa1; 140 | } 141 | .calendar.limit-event-title .event { 142 | overflow: hidden; 143 | text-overflow: ellipsis; 144 | white-space: nowrap; 145 | } 146 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/calendar/zui.calendar.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | /*! 9 | * ZUI - v1.4.0 - 2016-01-26 10 | * http://zui.sexy 11 | * GitHub: https://github.com/easysoft/zui.git 12 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 13 | */.calendar{margin-bottom:20px}.calendar>header{margin-bottom:10px}.calendar>header .btn-toolbar>.btn-group{margin-right:10px}.calendar>header .calendar-caption{line-height:30px}.calendar .table{margin-bottom:0;table-layout:fixed}.calendar .table>tbody>tr>td,.calendar .table>thead>tr>th{width:14.28571428571429%;padding:0}.calendar .table>thead>tr>th{color:grey;text-align:center;background-color:#fff}.calendar .day{opacity:.7}.calendar .day>.heading{padding:2px 5px;text-align:right}.calendar .day>.heading>.month{padding:1px 2px;color:#fff;background-color:#b3b3b3;border-radius:3px}.calendar .day>.content{height:100%;min-height:70px}.calendar .day.drop-to{background-color:#fff0d5;opacity:1}.calendar .cell-day{background-color:#f1f1f1}.calendar .cell-day.past>.day>.content{opacity:.7}.calendar .cell-day.current-month{background:0 0}.calendar .cell-day.current-month>.day{opacity:1}.calendar .cell-day.current{background-color:#fff0d5;box-shadow:inset 1px 1px 0 grey,inset -1px -1px 0 grey}.calendar .cell-day.current>.day>.content{padding:0}.calendar .cell-day.current>.day>.heading{background-color:rgba(0,0,0,.1)}.calendar .event{padding:1px 5px;margin:0 1px 1px;color:#fff;cursor:pointer;background-color:#3280fc;opacity:.95;-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}a.calendar .event:hover{background-color:#0462f7}.calendar .event:hover{opacity:1}.calendar .event.drag-shadow{cursor:move}.calendar .event.drag-from{opacity:.25}.calendar .event.color-red{color:#fff;background-color:#ea644a}a.calendar .event.color-red:hover{background-color:#e53d1c}.calendar .event.color-green{color:#fff;background-color:#38b03f}a.calendar .event.color-green:hover{background-color:#2c8931}.calendar .event.color-yellow{color:#fff;background-color:#f1a325}a.calendar .event.color-yellow:hover{background-color:#d5890e}.calendar .event.color-blue{color:#fff;background-color:#03b8cf}a.calendar .event.color-blue:hover{background-color:#028b9d}.calendar .event.color-brown{color:#fff;background-color:#bd7b46}a.calendar .event.color-brown:hover{background-color:#996337}.calendar .event.color-purple{color:#fff;background-color:#8666b8}a.calendar .event.color-purple:hover{background-color:#6c4aa1}.calendar.limit-event-title .event{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} -------------------------------------------------------------------------------- /public/static/admin/zui/lib/chosen/chosen.icons.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | .chosen-container.chosen-icons .chosen-results { 9 | padding: 5px; 10 | } 11 | .chosen-container.chosen-icons .chosen-results li { 12 | border-radius: 4px; 13 | } 14 | .chosen-container.chosen-icons .chosen-results li.group-result { 15 | padding: 5px 0; 16 | font-size: 12px; 17 | color: #666; 18 | border-radius: 0; 19 | } 20 | .chosen-container.chosen-icons .chosen-results li.group-option { 21 | display: inline-block; 22 | width: 30px; 23 | padding: 8px; 24 | font-size: 14px; 25 | line-height: 14px; 26 | text-align: center; 27 | } 28 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/chosen/chosen.icons.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | /*! 9 | * ZUI - v1.4.0 - 2016-01-26 10 | * http://zui.sexy 11 | * GitHub: https://github.com/easysoft/zui.git 12 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 13 | */.chosen-container.chosen-icons .chosen-results{padding:5px}.chosen-container.chosen-icons .chosen-results li{border-radius:4px}.chosen-container.chosen-icons .chosen-results li.group-result{padding:5px 0;font-size:12px;color:#666;border-radius:0}.chosen-container.chosen-icons .chosen-results li.group-option{display:inline-block;width:30px;padding:8px;font-size:14px;line-height:14px;text-align:center} -------------------------------------------------------------------------------- /public/static/admin/zui/lib/datatable/zui.datatable.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | /*! 9 | * ZUI - v1.4.0 - 2016-01-26 10 | * http://zui.sexy 11 | * GitHub: https://github.com/easysoft/zui.git 12 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 13 | */.datatable-head,.datatable-rows{display:table;width:100%;table-layout:fixed}.datatable{margin-bottom:20px}.datatable>.datatable-head{-webkit-transition:box-shadow .2s;transition:box-shadow .2s}.datatable .table{margin:0;table-layout:fixed}.datatable .table>tbody>tr>td,.datatable .table>thead>tr>th{min-width:20px}.datatable .table>tbody>tr>td.check-btn,.datatable .table>thead>tr>th.check-btn{width:30px;color:#9b9b9b;text-align:center;cursor:pointer}.datatable .table>tbody>tr.active>td.check-btn,.datatable .table>tbody>tr.hover>td.check-btn,.datatable .table>tbody>tr>td.check-btn.checked,.datatable .table>tbody>tr>td.check-btn:hover,.datatable .table>thead>tr>th.check-btn.checked,.datatable .table>thead>tr>th.check-btn:hover{color:#4f4f4f}.datatable .table>tbody>tr.active>td.check-btn>.icon-check-empty:before,.datatable .table>tbody>tr>td.check-btn.checked>.icon-check-empty:before,.datatable .table>thead>tr>th.check-btn.checked>.icon-check-empty:before{content:'\e642'}.datatable .table>thead>tr>th.col-hover{background-color:#e2e2e2}.datatable .table>tbody>tr.hover>td,.datatable .table>tbody>tr>td.col-hover{background-color:#ebf2f9}.datatable .table>tbody>tr.active.hover td{background-color:#ffdea2}.datatable.head-fixed>.datatable-head{position:fixed;z-index:10000;box-shadow:0 1px 4px 0 rgba(0,0,0,.15)}.datatable.sortable .datatable-head-span .table>thead>tr>th{overflow:hidden;white-space:nowrap;cursor:pointer}.datatable.sortable .datatable-head-span .table>thead>tr>th.text-center{padding-right:0;padding-left:0}.datatable.sortable .datatable-head-span .table>thead>tr>th:after{display:inline-block;margin-left:5px;font-family:ZenIcon;font-size:14px;font-style:normal;font-weight:400;font-variant:normal;line-height:1;color:grey;text-transform:none;content:'\e6bd';speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-down:after{color:#145ccd;content:'\e6b8'}.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-up:after{color:#145ccd;content:'\e6b9'}.datatable.sortable .datatable-head-span .table>thead>tr>th.check-btn:after,.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-disabled:after{display:none}.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-disabled{cursor:default}.datatable-wrapper{position:relative}.datatable-span{display:table-cell;vertical-align:top}.datatable-span.flexarea{overflow:hidden}.datatable-span.flexarea.datatable-head-span.dragging{cursor:move!important}.datatable-span.flexarea .table{position:relative;top:0;left:0}.datatable-span.flexarea .scrolled-shadow{position:absolute;top:0;bottom:0;display:none;width:20px;box-shadow:0 0 10px rgba(0,0,0,.15);opacity:0;-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.datatable-span.flexarea .scrolled-in-shadow{left:-30px}.datatable-span.flexarea .scrolled-out-shadow{right:-30px}.datatable>.scroll-wrapper{position:relative;width:100%}.datatable .scroll-slide{position:absolute;right:-1px;bottom:0;left:-1px;display:none;height:11px;background:#e5e5e5;background:rgba(128,128,128,.1);border:1px solid #e5e5e5;border-bottom:none;opacity:0;-webkit-transition:opacity .5s,background .3s;transition:opacity .5s,background .3s}.datatable .scroll-slide>.bar{position:absolute;top:0;left:0;min-width:50px;height:10px;cursor:move;background-color:#a6a6a6}.datatable .scroll-slide:hover>.bar{background-color:grey}.datatable .scroll-slide.scroll-pos-out{bottom:-14px;height:15px}.datatable .scroll-slide.scroll-pos-out>.bar{height:14px}.datatable.show-scroll-slide.scrolling .scroll-slide,.datatable.show-scroll-slide.scrolling .scrolled-shadow,.datatable.show-scroll-slide:hover .scroll-slide,.datatable.show-scroll-slide:hover .scrolled-shadow{opacity:1}.datatable.show-scroll-slide .scroll-slide,.datatable.show-scroll-slide .scrolled-shadow{display:block}.datatable.show-scroll-slide.scrolled-in .scrolled-in-shadow{left:-20px}.datatable.show-scroll-slide.scrolled-out .scrolled-out-shadow{right:-20px} -------------------------------------------------------------------------------- /public/static/admin/zui/lib/droppable/droppable.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | !function(t,e){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var o=0;t.zui({uuid:function(){return 1e3*(new Date).getTime()+o++%1e3},callEvent:function(e,o,n){if(t.isFunction(e)){void 0!==n&&(e=t.proxy(e,n));var i=e(o);return o&&(o.result=i),!(void 0!==i&&!i)}return 1},clientLang:function(){var o,n=e.config;if("undefined"!=typeof n&&n.clientLang)o=n.clientLang;else{var i=t("html").attr("lang");o=i?i:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return o.replace("-","_").toLowerCase()}}),t.fn.callEvent=function(e,o,n){var i=t(this),s=e.indexOf(".zui."),r=e;0>s&&n&&n.name?e+="."+n.name:r=e.substring(0,s);var a=t.Event(e,o);if(void 0===n&&s>0&&(n=i.data(e.substring(s+1))),n&&n.options){var l=n.options[r];t.isFunction(l)&&t.zui.callEvent(n.options[r],a,n)}return a}}(jQuery,window),function(t,e,o){"use strict";var n=function(e,o){this.$=t(e),this.options=this.getOptions(o),this.init()};n.DEFAULTS={container:"body",deviation:5,sensorOffsetX:0,sensorOffsetY:0},n.prototype.getOptions=function(e){return e=t.extend({},n.DEFAULTS,this.$.data(),e)},n.prototype.callEvent=function(e,o){return t.zui.callEvent(this.options[e],o,this)},n.prototype.init=function(){this.handleMouseEvents()},n.prototype.handleMouseEvents=function(){var n=this.$,i=this,s=this.options,r="before";this.$triggerTarget=s.trigger?(t.isFunction(s.trigger)?s.trigger(n):n.find(s.trigger)).first():n,this.$triggerTarget.on("mousedown",function(a){function l(e){var r={left:e.pageX,top:e.pageY};if(!(o.abs(r.left-E.left)a&&r.top>l&&r.leftn;n++)if(h[a[n]])return s.apply(this,arguments)}}}}e.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},e.each(["keydown","keyup","keypress"],function(){e.event.special[this]={add:t}})}(jQuery); -------------------------------------------------------------------------------- /public/static/admin/zui/lib/ieonly/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); 8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b .canvas { 15 | position: relative; 16 | min-width: 50px; 17 | max-width: 100%; 18 | margin: 0 auto; 19 | } 20 | .img-cutter > .canvas > .cover { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | z-index: 1; 25 | width: 100%; 26 | height: 100%; 27 | -webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1); 28 | transition: all .4s cubic-bezier(.175, .885, .32, 1); 29 | } 30 | .img-cutter > .canvas > img { 31 | -webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1); 32 | transition: all .4s cubic-bezier(.175, .885, .32, 1); 33 | } 34 | .img-cutter > .canvas > .controller { 35 | position: absolute; 36 | top: 5%; 37 | left: 5%; 38 | z-index: 5; 39 | width: 100px; 40 | height: 100px; 41 | cursor: move; 42 | background: none; 43 | border: 1px dashed #fff; 44 | border-color: rgba(255, 255, 255, .7); 45 | -webkit-transition: opacity .4s cubic-bezier(.175, .885, .32, 1); 46 | transition: opacity .4s cubic-bezier(.175, .885, .32, 1); 47 | } 48 | .img-cutter > .canvas > .controller > .control { 49 | position: absolute; 50 | width: 6px; 51 | height: 6px; 52 | background: #000; 53 | background: rgba(0, 0, 0, .6); 54 | border: 1px solid #fff; 55 | border-color: rgba(255, 255, 255, .6); 56 | } 57 | .img-cutter > .canvas > .controller > .control[data-direction='left'] { 58 | top: 50%; 59 | left: -4px; 60 | margin-top: -3px; 61 | cursor: w-resize; 62 | } 63 | .img-cutter > .canvas > .controller > .control[data-direction='top'] { 64 | top: -4px; 65 | left: 50%; 66 | margin-left: -3px; 67 | cursor: n-resize; 68 | } 69 | .img-cutter > .canvas > .controller > .control[data-direction='right'] { 70 | top: 50%; 71 | right: -4px; 72 | margin-top: -3px; 73 | cursor: e-resize; 74 | } 75 | .img-cutter > .canvas > .controller > .control[data-direction='bottom'] { 76 | bottom: -4px; 77 | left: 50%; 78 | margin-left: -3px; 79 | cursor: s-resize; 80 | } 81 | .img-cutter > .canvas > .controller > .control[data-direction='top-left'] { 82 | top: -4px; 83 | left: -4px; 84 | cursor: nw-resize; 85 | } 86 | .img-cutter > .canvas > .controller > .control[data-direction='top-right'] { 87 | top: -4px; 88 | right: -4px; 89 | cursor: ne-resize; 90 | } 91 | .img-cutter > .canvas > .controller > .control[data-direction='bottom-left'] { 92 | bottom: -4px; 93 | left: -4px; 94 | cursor: sw-resize; 95 | } 96 | .img-cutter > .canvas > .controller > .control[data-direction='bottom-right'] { 97 | right: -4px; 98 | bottom: -4px; 99 | cursor: se-resize; 100 | } 101 | .img-cutter > .canvas > .cliper { 102 | position: absolute; 103 | top: 0; 104 | left: 0; 105 | z-index: 2; 106 | width: 100%; 107 | height: 100%; 108 | clip: rect(0px, 50px, 50px, 0); 109 | } 110 | .img-cutter.hover > .canvas > img, 111 | .img-cutter.hover > .canvas > .controller > .cover { 112 | filter: alpha(opacity=0); 113 | opacity: 0; 114 | } 115 | .img-cutter.hover > .canvas > .controller { 116 | display: none; 117 | } 118 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/imgcutter/zui.imgcutter.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | /*! 9 | * ZUI - v1.4.0 - 2016-01-26 10 | * http://zui.sexy 11 | * GitHub: https://github.com/easysoft/zui.git 12 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 13 | */.img-cutter{padding:10px;margin-bottom:20px;background:#e5e5e5;border:1px solid #ddd}.img-cutter>.canvas{position:relative;min-width:50px;max-width:100%;margin:0 auto}.img-cutter>.canvas>.cover{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.img-cutter>.canvas>img{-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.img-cutter>.canvas>.controller{position:absolute;top:5%;left:5%;z-index:5;width:100px;height:100px;cursor:move;background:0 0;border:1px dashed #fff;border-color:rgba(255,255,255,.7);-webkit-transition:opacity .4s cubic-bezier(.175,.885,.32,1);transition:opacity .4s cubic-bezier(.175,.885,.32,1)}.img-cutter>.canvas>.controller>.control{position:absolute;width:6px;height:6px;background:#000;background:rgba(0,0,0,.6);border:1px solid #fff;border-color:rgba(255,255,255,.6)}.img-cutter>.canvas>.controller>.control[data-direction=left]{top:50%;left:-4px;margin-top:-3px;cursor:w-resize}.img-cutter>.canvas>.controller>.control[data-direction=top]{top:-4px;left:50%;margin-left:-3px;cursor:n-resize}.img-cutter>.canvas>.controller>.control[data-direction=right]{top:50%;right:-4px;margin-top:-3px;cursor:e-resize}.img-cutter>.canvas>.controller>.control[data-direction=bottom]{bottom:-4px;left:50%;margin-left:-3px;cursor:s-resize}.img-cutter>.canvas>.controller>.control[data-direction=top-left]{top:-4px;left:-4px;cursor:nw-resize}.img-cutter>.canvas>.controller>.control[data-direction=top-right]{top:-4px;right:-4px;cursor:ne-resize}.img-cutter>.canvas>.controller>.control[data-direction=bottom-left]{bottom:-4px;left:-4px;cursor:sw-resize}.img-cutter>.canvas>.controller>.control[data-direction=bottom-right]{right:-4px;bottom:-4px;cursor:se-resize}.img-cutter>.canvas>.cliper{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;clip:rect(0,50px,50px,0)}.img-cutter.hover>.canvas>.controller>.cover,.img-cutter.hover>.canvas>img{filter:alpha(opacity=0);opacity:0}.img-cutter.hover>.canvas>.controller{display:none} -------------------------------------------------------------------------------- /public/static/admin/zui/lib/kindeditor/themes/default/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/zui/lib/kindeditor/themes/default/default.png -------------------------------------------------------------------------------- /public/static/admin/zui/lib/kindeditor/themes/default/default.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/zui/lib/kindeditor/themes/default/default.psd -------------------------------------------------------------------------------- /public/static/admin/zui/lib/kindeditor/themes/default/gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/curder/laravel5-rbac/42f0e8ab6965c2173db888f8bc6b24225c733f20/public/static/admin/zui/lib/kindeditor/themes/default/gray.png -------------------------------------------------------------------------------- /public/static/admin/zui/lib/migrate/migrate1.2.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | /* ======================================================================== 9 | * ZUI: zui.migrate.1.2.js 10 | * This file inclues some helper methods to help upgrad version 1.2 or 11 | * lower to version 1.3 12 | * If you are using 1.3+, then ignore this. 13 | * http://zui.sexy 14 | * ======================================================================== 15 | * Copyright (c) 2014 cnezsoft.com; Licensed MIT 16 | * ======================================================================== */ 17 | 18 | 19 | (function($, window) { 20 | var zui = $.zui; 21 | if(zui) { 22 | function extendTo(name, target) { 23 | if($.isArray(name)) { 24 | $.each(name, function(i, n) { 25 | extendTo(n, target); 26 | }); 27 | return; 28 | } 29 | 30 | var config = {}; 31 | config[name] = zui[name]; 32 | 33 | if(target) { 34 | $.extend(target, config); 35 | } else { 36 | $.extend(config); 37 | } 38 | } 39 | 40 | extendTo(['uuid', 'callEvent', 'clientLang', 'browser', 'messager', 'Messager', 'showMessager', 'closeModal', 'ajustModalPosition', 'ModalTrigger', 'modalTrigger', 'store']); 41 | extendTo(['Color', 'imgReady', 'messager', 'Messager', 'showMessager', 'closeModal', 'ajustModalPosition', 'ModalTrigger', 'modalTrigger', 'store'], window); 42 | } 43 | }(jQuery, window)); 44 | 45 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/migrate/migrate1.2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZUI - v1.4.0 - 2016-01-26 3 | * http://zui.sexy 4 | * GitHub: https://github.com/easysoft/zui.git 5 | * Copyright (c) 2016 cnezsoft.com; Licensed MIT 6 | */ 7 | 8 | !function(e,o){function r(o,a){if(e.isArray(o))return void e.each(o,function(e,o){r(o,a)});var i={};i[o]=s[o],a?e.extend(a,i):e.extend(i)}var s=e.zui;s&&(r(["uuid","callEvent","clientLang","browser","messager","Messager","showMessager","closeModal","ajustModalPosition","ModalTrigger","modalTrigger","store"]),r(["Color","imgReady","messager","Messager","showMessager","closeModal","ajustModalPosition","ModalTrigger","modalTrigger","store"],o))}(jQuery,window); -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-apollo.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 2 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-basic.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun", 3 | /^.[^\s\w"$%.]*/,a]]),["basic","cbm"]); 4 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | var a=null; 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], 18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]); 19 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n\u000c"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]+)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//], 2 | ["com",/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}\b/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-dart.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!.*/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/.*/],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i], 2 | ["typ",/^\b(?:bool|double|dynamic|int|num|object|string|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?'''[\S\s]*?[^\\]'''/],["str",/^r?"""[\S\s]*?[^\\]"""/],["str",/^r?'('|[^\n\f\r]*?[^\\]')/],["str",/^r?"("|[^\n\f\r]*?[^\\]")/],["pln",/^[$_a-z]\w*/i],["pun",/^[!%&*+/:<-?^|~-]/],["lit",/^\b0x[\da-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit",/^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(),.;[\]{}]/]]), 3 | ["dart"]); 4 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-erlang.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], 2 | ["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-go.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]); 2 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]); 4 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-llvm.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]); 2 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-lua.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i], 2 | ["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-ml.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], 2 | ["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-mumps.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"]|\\.)*"/,null,'"']],[["com",/^;[^\n\r]*/,null,";"],["dec",/^\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\b/i, 2 | null],["kwd",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\b/i,null],["lit",/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?/i],["pln",/^[a-z][^\W_]*/i],["pun",/^[^\w\t\n\r"$%;^\xa0]|_/]]),["mumps"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-pascal.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^'(?:[^\n\r'\\]|\\.)*(?:'|$)/,a,"'"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/,a],["kwd",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i,a], 3 | ["lit",/^(?:true|false|self|nil)/i,a],["pln",/^[a-z][^\W_]*/i,a],["lit",/^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i,a,"0123456789"],["pun",/^.[^\s\w$'./@]*/,a]]),["pascal"]); 4 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-r.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/], 2 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-rd.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[@-Za-z]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[()[\]{}]+/]]),["Rd","rd"]); 2 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-scala.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/], 2 | ["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-sql.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\w-]|$)/i, 2 | null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-tcl.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^{+/,a,"{"],["clo",/^}+/,a,"}"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,a],["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit", 3 | /^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["tcl"]); 4 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-tex.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]); 2 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-vb.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i, 2 | null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, 2 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i], 3 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]); 4 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-wiki.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]); 2 | PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /public/static/admin/zui/lib/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ### Larval 5.2 Rbac 示例 2 | #### 说明 3 | - 这只是一个基于Laravel5.2 和 [zizaco/entrust](https://github.com/Zizaco/entrust "zizaco/entrust")实现的RBAC的简单示例应用,可以扩展一下应用到实际项目中。 4 | 5 | - 参考了[yuansir/laravel5-rbac-example](https://github.com/yuansir/laravel5-rbac-example) 的一些实现。 6 | 7 | - 超级管理员默认ID为1。 8 | 9 | - `permissions`表中有一个`group`字段标识后台菜单分组,数值对应`/config/menu.php`文件的配置。 10 | 11 | #### 安装步骤 12 | 13 | - **clone**代码到本地, `git clone git@github.com:curder/laravel5_rbac.git` 14 | 15 | - 项目目录下执行 `composer install` 16 | 17 | - 配置 `.env` 中数据库连接信息 18 | 19 | - 执行 `php artisan key` 20 | 21 | - 项目目录下执行 `php artisan migrate`和`php artisan db:seed`,填充默认的数据库表结构和RBAC相关数据 22 | - 如果使用mac系统使用mamp环境,执行 `php artisan migrate`的时候可能出现错误,如下: 23 | ``` 24 | [PDOException] 25 | SQLSTATE[HY000] [2002] No such file or directory 26 | ``` 27 | 解决方案,参考这里:[ Getting this error? [PDOException] SQLSTATE[HY000] [2002] No such file or directory](http://www.johnshipp.com/php-artisan-migrate-laravel-5-pdoexception-sqlstatehy000-2002-no-such-file-or-directory-on-a-mac-using-mamp/) 28 | 29 | - 如果在安装过程中报如下错误 30 | > ``` 31 | **FatalErrorException** in `Container.php` line 698: 32 | Maximum function nesting level of '100' reached, aborting! 33 | ``` 34 | >修改`php.ini`文件`xdebug.max_nesting_level=500`,参考这里:[fatal-error-maximum-function-nesting-level-of-100](http://stackoverflow.com/questions/8656089/solution-for-fatal-error-maximum-function-nesting-level-of-100-reached-abor) 35 | 36 | - 项目目录下执行 `php artisan serve` 使用默认的 `http://localhost:8000`访问首页 37 | 38 | - 默认后台账号: `admin@admin.com` 密码 : `aaaaaa` 39 | 40 | ### 以下是截图 41 | 42 | #### 普通测试用户权限 43 | 44 | ![](https://raw.githubusercontent.com/curder/laravel5_rbac/master/public/static/admin/images/01.jpg) 45 | 46 | ![](https://raw.githubusercontent.com/curder/laravel5_rbac/master/public/static/admin/images/forbidden.jpg) 47 | 48 | 49 | #### 管理员授权 50 | 51 | ![](https://raw.githubusercontent.com/curder/laravel5_rbac/master/public/static/admin/images/02.jpg) 52 | ![](https://raw.githubusercontent.com/curder/laravel5_rbac/master/public/static/admin/images/03.jpg) 53 | 54 | 55 | ### 感谢开源 -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | // @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 2 | 3 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/zh_cn/auth.php: -------------------------------------------------------------------------------- 1 | '用户名/密码不匹配', 4 | 'throttle' => '失败次数太多,请在:seconds秒后再尝试', 5 | ]; 6 | -------------------------------------------------------------------------------- /resources/lang/zh_cn/pagination.php: -------------------------------------------------------------------------------- 1 | '« 上一页', 4 | 'next' => '下一页 »', 5 | ]; -------------------------------------------------------------------------------- /resources/lang/zh_cn/passwords.php: -------------------------------------------------------------------------------- 1 | '密码长度至少包含6个字符并且两次输入密码要一致', 4 | 'reset' => '密码已经被重置!', 5 | 'sent' => '我们已经发送密码重置链接到您的邮箱', 6 | 'token' => '密码重置令牌无效', 7 | 'user' => "该邮箱对应的用户不存在!", 8 | 9 | ]; -------------------------------------------------------------------------------- /resources/views/admin/errors/403.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 |
5 |
403 Forbidden
6 | 7 |
8 |

没有权限.

9 | 10 |

11 | 抱歉,你没有操作权限! 12 | 此时你可以返回  首页  或者  返回上一页  . 13 |

14 | 15 |
16 | 17 |
18 |
19 | @stop -------------------------------------------------------------------------------- /resources/views/admin/index/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
个人面板
9 | 10 |
11 | 恭喜你,已登录! 12 |
13 |
14 |
15 |
16 |
17 | @stop 18 | -------------------------------------------------------------------------------- /resources/views/admin/layouts/nav.blade.php: -------------------------------------------------------------------------------- 1 | @if(isset($menuList['child'])) 2 | @foreach($menuList['child'] as $key => $menuChild) 3 | 4 | 20 | @endforeach 21 | @endif -------------------------------------------------------------------------------- /resources/views/admin/permission/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 |
5 |
6 | @if( IS_ROOT || Entrust::can('admin.permission.index') ) 权限管理  @endif 7 | @if( IS_ROOT || Entrust::can('admin.permission.create') ) 新增权限  @endif 8 |
9 |
10 | 11 | @if($data->total() == 0) 12 | @include('layouts.empty',['info'=>sprintf('抱歉!没有找到数据..添加权限',route('admin.permission.create'))] ) 13 | @else 14 |
15 |
16 | 权限管理 {{ $data->total() }} 记录 17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @foreach($data as $permission) 30 | 31 | 32 | 33 | 34 | 40 | 41 | @endforeach 42 | 43 |
ID权限中文名权限英文名操作
{{ $permission->id }}{{ $permission->display_name }}{{ $permission->name }} 35 | @if( IS_ROOT || Entrust::can('admin.permission.getCreate') )新增子权限 @endif 36 | @if( IS_ROOT || Entrust::can('admin.permission.edit') )修改 @endif 37 | {{--禁用  38 | 删除 --}} 39 |
44 |
45 | {!! $data->render() !!} 46 |
47 |
48 | 50 |
51 | @endif 52 |
53 | @stop -------------------------------------------------------------------------------- /resources/views/admin/role/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 |
5 | 9 |
10 | 11 |
12 |
13 | 添加角色 14 |
15 | 16 | {!! Form::open(['url' => route('admin.role.store'),'method'=>'post','class'=>'form-horizontal']) !!} 17 |
18 |
19 |
20 | @include('layouts.errors') 21 |
22 |
23 |
24 | {!! Form::label('name','角色英文名',['class'=>'control-label col-md-4']) !!} 25 |
26 | {!! Form::text('name',old('name'),['class'=>'form-control','placeholder'=>'角色英文名不允许重复']) !!} 27 |
28 |
29 | 30 |
31 | {!! Form::label('display_name','角色中文文名',['class'=>'control-label col-md-4']) !!} 32 |
33 | {!! Form::text('display_name',old('display_name'),['class'=>'form-control','placeholder'=>'角色展示中文名']) !!} 34 |
35 |
36 | 37 |
38 | {!! Form::label('description',"简要描述",['class'=>'control-label col-md-4']) !!} 39 |
40 | {!! Form::textarea('description',old('description'),['placeholder'=>'这里填写当前角色的简要描述','class'=>'form-control']) !!} 41 |
42 |
43 | 44 |
45 |
46 | {!! Form::submit('保存', array('class' => 'btn btn-primary')) !!} 47 | {!! Form::button('返回', ['class' => 'btn btn-default','onclick'=>'javascript:history.back(-1);return false;']) !!} 48 |
49 |
50 |
51 | {!! Form::close() !!} 52 |
53 |
54 | @stop -------------------------------------------------------------------------------- /resources/views/admin/role/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 |
5 | 9 |
10 | 11 |
12 |
13 | 编辑角色 {{ $role->name }} 14 |
15 | 16 | {!! Form::open(['url' => route('admin.role.update',$role->id),'method'=>'post','class'=>'form-horizontal']) !!} 17 | {{ method_field('PUT') }} 18 |
19 |
20 |
21 | @include('layouts.errors') 22 |
23 |
24 |
25 | {!! Form::label('name','角色英文名',['class'=>'control-label col-md-4']) !!} 26 |
27 | {!! Form::text('name',$role->name,['class'=>'form-control','placeholder'=>'角色英文名不允许重复']) !!} 28 |
29 |
30 | 31 |
32 | {!! Form::label('display_name','角色中文名',['class'=>'control-label col-md-4']) !!} 33 |
34 | {!! Form::text('display_name',$role->display_name,['class'=>'form-control','placeholder'=>'角色展示中文名']) !!} 35 |
36 |
37 | 38 |
39 | {!! Form::label('description',"简要描述",['class'=>'control-label col-md-4']) !!} 40 |
41 | {!! Form::textarea('description',$role->description,['placeholder'=>'这里填写当前角色的简要描述','class'=>'form-control']) !!} 42 |
43 |
44 | 45 |
46 |
47 | {!! Form::submit('保存', array('class' => 'btn btn-primary')) !!} 48 | {!! Form::button('返回', ['class' => 'btn btn-default','onclick'=>'javascript:history.back(-1);return false;']) !!} 49 |
50 |
51 |
52 | {!! Form::close() !!} 53 |
54 |
55 | @stop -------------------------------------------------------------------------------- /resources/views/admin/role/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 |
5 |
6 | @if( IS_ROOT || Entrust::can('admin.role.edit') ) 角色管理  @endif 7 | @if( IS_ROOT || Entrust::can('admin.role.create') ) 新增角色  @endif 8 |
9 |
10 | 11 |
12 |
13 | 角色管理 {{ $data->total() }} 记录 14 |
15 |
16 | 17 | 18 | 19 | 22 | 25 | 28 | 31 | 32 | 33 | 34 | @foreach($data as $role) 35 | 36 | 37 | 38 | 39 | 45 | 46 | @endforeach 47 | 48 |
20 | UID 21 | 23 | 角色英文名 24 | 26 | 角色中文名 27 | 29 | 操作 30 |
{{ $role->id }}{{ $role->name }}{{ $role->display_name }} 40 | @if( IS_ROOT || Entrust::can('admin.role.edit') )修改 @endif 41 | @if( IS_ROOT || Entrust::can('admin.user.show') ) 授权 @endif 42 | {{--禁用  43 | 删除 --}} 44 |
49 |
50 | {!! $data->render() !!} 51 |
52 |
53 | 55 |
56 |
57 | @stop -------------------------------------------------------------------------------- /resources/views/admin/role/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('script') 3 | 22 | @stop 23 | @section('content') 24 |
25 |
26 | 31 |
32 | 33 | @if(empty($permissions)) 34 | @include('layouts.empty',['info'=>"抱歉!暂不存在任何权限,请添加权限。"]) 35 | @else 36 |
37 | {{ csrf_field() }} 38 | @foreach($permissions as $tree) 39 |
40 |
41 |
42 | 46 |
47 | @if(isset($tree['_child'])) 48 | @foreach($tree['_child'] as $tree2) 49 |
50 |
51 |
52 | 56 |
57 |   58 | 59 | @if(isset($tree2['_child'])) 60 | @foreach($tree2['_child'] as $tree3) 61 | 65 | @endforeach 66 | @endif 67 | 68 |
69 |
70 | @endforeach 71 | @endif 72 |
73 |
74 | @endforeach 75 |
76 | 79 |
80 |
81 | @endif 82 |
83 | @stop -------------------------------------------------------------------------------- /resources/views/admin/user/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 |
5 | 9 |
10 | 11 |
12 |
13 | 添加用户 14 |
15 | 16 | {!! Form::open(['url' => route('admin.user.store'),'method'=>'post','class'=>'form-horizontal']) !!} 17 |
18 |
19 |
20 | @include('layouts.errors') 21 |
22 |
23 |
24 | {!! Form::label('name','用户名',['class'=>'control-label col-md-4']) !!} 25 |
26 | {!! Form::text('name',old('name'),['class'=>'form-control','placeholder'=>'用户名不允许重复']) !!} 27 |
28 |
29 | {!! Form::text('real_name',old('real_name'),['class'=>'form-control','placeholder'=>'昵称不允许重复']) !!} 30 |
31 |
32 | 33 |
34 | {!! Form::label('email','邮箱',['class'=>'control-label col-md-4']) !!} 35 |
36 | {!! Form::email('email',old('email'),['class'=>'form-control','placeholder'=>'邮箱不允许重复']) !!} 37 |
38 |
39 | 40 |
41 | {!! Form::label('password','密码',['class'=>'control-label col-md-4']) !!} 42 |
43 | {!! Form::password('password', ['placeholder'=>'用户密码在6~18位','class'=>'form-control']) !!} 44 |
45 |
46 |
47 | {!! Form::label('password_confirmation',"确认密码",['class'=>'control-label col-md-4']) !!} 48 |
49 | {!! Form::password('password_confirmation',['placeholder'=>'确认密码在6~18位,且和上面的密码保持一致','class'=>'form-control']) !!} 50 |
51 |
52 | 53 |
54 | {!! Form::label('gender',"性别",['class'=>'control-label col-md-4']) !!} 55 |
56 | {!! Form::select('gender', ['不填','男','女'], old('gender') , array('class' => 'form-control')) !!} 57 |
58 |
59 | 60 |
61 |
62 | {!! Form::submit('保存', array('class' => 'btn btn-primary')) !!} 63 | {!! Form::button('返回', ['class' => 'btn btn-default','onclick'=>'javascript:history.back(-1);return false;']) !!} 64 |
65 |
66 |
67 | {!! Form::close() !!} 68 |
69 |
70 | @stop -------------------------------------------------------------------------------- /resources/views/admin/user/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 | 10 | 11 |
12 |
13 | 编辑用户 - {{ $user->name }} 14 |
15 | 16 | {!! Form::open(['url' => route('admin.user.update',$user->id),'method'=>'post','class'=>'form-horizontal']) !!} 17 | {{ method_field('PUT') }} 18 |
19 |
20 |
21 | @include('layouts.errors') 22 |
23 |
24 |
25 | {!! Form::label('name','用户名',['class'=>'control-label col-md-4']) !!} 26 |
27 | {!! Form::text('name',$user->name,['class'=>'form-control','disabled'=>true]) !!} 28 |
29 |
30 | {!! Form::text('real_name',$user->real_name,['class'=>'form-control','placeholder'=>'昵称不允许重复']) !!} 31 |
32 |
33 | 34 |
35 | {!! Form::label('email','邮箱',['class'=>'control-label col-md-4']) !!} 36 |
37 | {!! Form::email('email',$user->email,['class'=>'form-control','readonly'=>'readonly']) !!} 38 |
39 |
40 | 41 |
42 | {!! Form::label('password','新密码',['class'=>'control-label col-md-4']) !!} 43 |
44 | {!! Form::password('password', ['placeholder'=>'用户新密码在6~18位','class'=>'form-control']) !!} 45 |
46 |
47 |
48 | {!! Form::label('password_confirmation',"确认密码",['class'=>'control-label col-md-4']) !!} 49 |
50 | {!! Form::password('password_confirmation',['placeholder'=>'确认密码在6~18位,且和上面的密码保持一致','class'=>'form-control']) !!} 51 |
52 |
53 | 54 |
55 | {!! Form::label('gender',"性别",['class'=>'control-label col-md-4']) !!} 56 |
57 | {!! Form::select('gender', ['不填','男','女'], $user->gender , array('class' => 'form-control')) !!} 58 |
59 |
60 | 61 |
62 |
63 | {!! Form::submit('保存', array('class' => 'btn btn-primary')) !!} 64 | {!! Form::button('返回', ['class' => 'btn btn-default','onclick'=>'javascript:history.back(-1);return false;']) !!} 65 |
66 |
67 |
68 | {!! Form::close() !!} 69 |
70 |
71 | @stop -------------------------------------------------------------------------------- /resources/views/admin/user/group.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('script') 3 | 16 | @stop 17 | @section('content') 18 |
19 | 25 | 26 |
27 |
28 | 授权用户 - {{ $user->name }} 到组 完事用户就拥有该组的相关权限 29 |
30 | 31 | {!! Form::open(['url' => route('admin.user.postGroup',$user->id),'method'=>'post','class'=>'form-horizontal']) !!} 32 |
33 |
34 |
35 | @include('layouts.errors') 36 |
37 |
38 |
39 | {!! Form::label('name','用户名',['class'=>'control-label col-md-4']) !!} 40 |
41 | {!! Form::text('name',$user->name,['class'=>'form-control','disabled'=>true]) !!} 42 |
43 |
44 | 45 |
46 | {!! Form::label('parent_id',"所属角色",['class'=>'control-label col-md-4']) !!} 47 |
48 | 56 |
57 |
58 | 59 | 60 |
61 |
62 | {!! Form::submit('保存', array('class' => 'btn btn-primary')) !!} 63 | {!! Form::button('返回', ['class' => 'btn btn-default','onclick'=>'javascript:history.back(-1);return false;']) !!} 64 |
65 |
66 |
67 | {!! Form::close() !!} 68 |
69 |
70 | @stop -------------------------------------------------------------------------------- /resources/views/admin/user/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.layouts.base') 2 | @section('content') 3 |
4 |
5 |
6 | @if( IS_ROOT || Entrust::can('admin.user.index') ) 用户管理  @endif 7 | @if( IS_ROOT || Entrust::can('admin.user.create') ) 新增用户  @endif 8 |
9 |
10 | 11 |
12 |
13 | 用户管理 {{ $data->total() }} 记录 14 |
15 |
16 | 17 | 18 | 19 | 22 | 25 | 28 | 31 | 34 | 35 | 36 | 37 | @foreach($data as $user) 38 | 39 | 40 | 41 | 42 | 45 | 51 | 52 | @endforeach 53 | 54 |
20 | UID 21 | 23 | 用户名 24 | 26 | 最后登录时间 27 | 29 | 用户状态 30 | 32 | 操作 33 |
{{ $user->id }}{{ $user->name }}{{ $user->updated_at }} 43 | {!! $user->status_str !!} 44 | 46 | @if( IS_ROOT || Entrust::can('admin.user.edit') )修改密码 @endif 47 | @if( IS_ROOT || Entrust::can('admin.user.getGroup') ) 授权 @endif 48 | {{--禁用  49 | 删除 --}} 50 |
55 |
56 | {!! $data->render() !!} 57 |
58 |
59 | 61 |
62 |
63 | @stop -------------------------------------------------------------------------------- /resources/views/auth/emails/password.blade.php: -------------------------------------------------------------------------------- 1 | Click here to reset your password: {{ $link }} 2 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Login
9 |
10 |
11 | {{ csrf_field() }} 12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | @if ($errors->has('email')) 20 | 21 | {{ $errors->first('email') }} 22 | 23 | @endif 24 |
25 |
26 | 27 |
28 | 29 | 30 |
31 | 32 | 33 | @if ($errors->has('password')) 34 | 35 | {{ $errors->first('password') }} 36 | 37 | @endif 38 |
39 |
40 | 41 |
42 |
43 |
44 | 47 |
48 |
49 |
50 | 51 |
52 |
53 | 56 | 57 | Forgot Your Password? 58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | @endsection 67 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | 4 | @section('content') 5 |
6 |
7 |
8 |
9 |
Reset Password
10 |
11 | @if (session('status')) 12 |
13 | {{ session('status') }} 14 |
15 | @endif 16 | 17 |
18 | {{ csrf_field() }} 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @if ($errors->has('email')) 27 | 28 | {{ $errors->first('email') }} 29 | 30 | @endif 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 | 10 |
11 |
12 | {{ csrf_field() }} 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @if ($errors->has('email')) 23 | 24 | {{ $errors->first('email') }} 25 | 26 | @endif 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @if ($errors->has('password')) 37 | 38 | {{ $errors->first('password') }} 39 | 40 | @endif 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 | 49 | @if ($errors->has('password_confirmation')) 50 | 51 | {{ $errors->first('password_confirmation') }} 52 | 53 | @endif 54 |
55 |
56 | 57 |
58 |
59 | 62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | @endsection 71 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Register
9 |
10 |
11 | {{ csrf_field() }} 12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | @if ($errors->has('name')) 20 | 21 | {{ $errors->first('name') }} 22 | 23 | @endif 24 |
25 |
26 | 27 |
28 | 29 | 30 |
31 | 32 | 33 | @if ($errors->has('email')) 34 | 35 | {{ $errors->first('email') }} 36 | 37 | @endif 38 |
39 |
40 | 41 |
42 | 43 | 44 |
45 | 46 | 47 | @if ($errors->has('password')) 48 | 49 | {{ $errors->first('password') }} 50 | 51 | @endif 52 |
53 |
54 | 55 |
56 | 57 | 58 |
59 | 60 | 61 | @if ($errors->has('password_confirmation')) 62 | 63 | {{ $errors->first('password_confirmation') }} 64 | 65 | @endif 66 |
67 |
68 | 69 |
70 |
71 | 74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | @endsection 83 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Be right back. 5 | 6 | 7 | 8 | 39 | 40 | 41 |
42 |
43 |
Be right back.
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Laravel 9 | 10 | 11 | 12 | {{----}} 13 | 14 | 15 | 16 | 17 | 18 | 64 | 65 | @yield('content') 66 | 67 | 68 | 69 | 70 | {{-- --}} 71 | 72 | 73 | -------------------------------------------------------------------------------- /resources/views/layouts/empty.blade.php: -------------------------------------------------------------------------------- 1 |
{!! $info or "抱歉!暂时没有数据.." !!}
-------------------------------------------------------------------------------- /resources/views/layouts/errors.blade.php: -------------------------------------------------------------------------------- 1 | @if(count($errors) > 0) 2 |
3 | 4 |
    5 | @if(is_object($errors)) 6 | @foreach($errors->all() as $err) 7 |
  • {{ trans($err) }}
  • 8 | @endforeach 9 | @elseif(is_string($errors)) 10 |
  • {{ trans($errors) }}
  • 11 | @endif 12 |
13 |
14 | @endif -------------------------------------------------------------------------------- /resources/views/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
欢迎你!
9 | 10 |
11 | 前台的默认首页 12 |
13 |
14 |
15 |
16 |
17 | @endsection 18 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | visit('/') 17 | ->see('Laravel 5'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /yarn-error.log: -------------------------------------------------------------------------------- 1 | Arguments: 2 | /Users/curder/.nvm/versions/node/v12.21.0/bin/node /opt/homebrew/bin/yarn 3 | 4 | PATH: 5 | /Users/curder/.yarn/bin:/Users/curder/.config/yarn/global/node_modules/.bin:/opt/homebrew/Cellar/mysql@5.7/5.7.32/bin:/Users/curder/.composer/vendor/bin:/Users/curder/.nvm/versions/node/v12.21.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin 6 | 7 | Yarn version: 8 | 1.22.10 9 | 10 | Node version: 11 | 12.21.0 12 | 13 | Platform: 14 | darwin arm64 15 | 16 | Trace: 17 | Error: https://registry.nlark.com/laravel-elixir/download/laravel-elixir-5.0.0.tgz: ESOCKETTIMEDOUT 18 | at ClientRequest. (/opt/homebrew/lib/node_modules/yarn/lib/cli.js:141289:19) 19 | at Object.onceWrapper (events.js:420:28) 20 | at ClientRequest.emit (events.js:314:20) 21 | at TLSSocket.emitRequestTimeout (_http_client.js:715:9) 22 | at Object.onceWrapper (events.js:420:28) 23 | at TLSSocket.emit (events.js:326:22) 24 | at TLSSocket.Socket._onTimeout (net.js:483:8) 25 | at listOnTimeout (internal/timers.js:554:17) 26 | at processTimers (internal/timers.js:497:7) 27 | 28 | npm manifest: 29 | { 30 | "private": true, 31 | "scripts": { 32 | "prod": "gulp --production", 33 | "dev": "gulp watch" 34 | }, 35 | "devDependencies": { 36 | "gulp": "^3.9.1", 37 | "laravel-elixir": "^5.0.0", 38 | "bootstrap-sass": "^3.0.0" 39 | } 40 | } 41 | 42 | yarn manifest: 43 | No manifest 44 | 45 | Lockfile: 46 | No lockfile 47 | --------------------------------------------------------------------------------