├── .gitattributes ├── resources ├── assets │ ├── img │ │ ├── bg.png │ │ ├── icons.png │ │ ├── user.png │ │ ├── favicon.ico │ │ ├── locked.png │ │ ├── success.png │ │ ├── progress.png │ │ └── loading-upload.gif │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ ├── glyphicons-halflings-regular.woff2 │ │ └── glyphicons-halflings-regulard41d.eot │ ├── css │ │ ├── patterns │ │ │ ├── shattered.png │ │ │ ├── header-profile.png │ │ │ ├── header-profile-skin-1.png │ │ │ └── header-profile-skin-3.png │ │ ├── plugins │ │ │ ├── iCheck │ │ │ │ ├── green.png │ │ │ │ ├── green@2x.png │ │ │ │ └── custom.css │ │ │ ├── blueimp │ │ │ │ └── img │ │ │ │ │ ├── error.png │ │ │ │ │ ├── loading.gif │ │ │ │ │ ├── play-pause.png │ │ │ │ │ ├── video-play.png │ │ │ │ │ ├── video-play.svg │ │ │ │ │ ├── error.svg │ │ │ │ │ └── play-pause.svg │ │ │ ├── images │ │ │ │ ├── sort_asc.png │ │ │ │ ├── sort_desc.png │ │ │ │ ├── spritemap.png │ │ │ │ ├── spritemap@2x.png │ │ │ │ └── sprite-skin-flat.png │ │ │ ├── chosen │ │ │ │ ├── chosen-sprite.png │ │ │ │ └── chosen-sprite@2x.png │ │ │ ├── footable │ │ │ │ └── fonts │ │ │ │ │ ├── footable.eot │ │ │ │ │ ├── footable.ttf │ │ │ │ │ ├── footable.woff │ │ │ │ │ └── footabled41d.eot │ │ │ ├── summernote │ │ │ │ └── font │ │ │ │ │ ├── summernote.eot │ │ │ │ │ ├── summernote.ttf │ │ │ │ │ └── summernote.woff │ │ │ ├── colorpicker │ │ │ │ ├── img │ │ │ │ │ └── bootstrap-colorpicker │ │ │ │ │ │ ├── hue.png │ │ │ │ │ │ ├── alpha.png │ │ │ │ │ │ ├── saturation.png │ │ │ │ │ │ ├── hue-horizontal.png │ │ │ │ │ │ └── alpha-horizontal.png │ │ │ │ └── css │ │ │ │ │ └── bootstrap-colorpicker.min.css │ │ │ ├── morris │ │ │ │ └── morris-0.4.3.min.css │ │ │ ├── webuploader │ │ │ │ └── webuploader.css │ │ │ ├── switchery │ │ │ │ └── switchery.css │ │ │ ├── fullcalendar │ │ │ │ └── fullcalendar.print.css │ │ │ ├── treeview │ │ │ │ └── bootstrap-treeview.css │ │ │ ├── ionRangeSlider │ │ │ │ ├── ion.rangeSlider.skinFlat.css │ │ │ │ └── ion.rangeSlider.css │ │ │ ├── markdown │ │ │ │ └── bootstrap-markdown.min.css │ │ │ ├── cropper │ │ │ │ └── cropper.min.css │ │ │ ├── nouslider │ │ │ │ └── jquery.nouislider.css │ │ │ ├── dropzone │ │ │ │ └── basic.css │ │ │ └── clockpicker │ │ │ │ └── clockpicker.css │ │ └── login.min.css │ └── js │ │ ├── plugins │ │ ├── fancybox │ │ │ ├── blank.gif │ │ │ ├── fancybox_loading.gif │ │ │ ├── fancybox_overlay.png │ │ │ ├── fancybox_sprite.png │ │ │ ├── fancybox_loading@2x.gif │ │ │ └── fancybox_sprite@2x.png │ │ ├── layer │ │ │ ├── layim │ │ │ │ └── loading.gif │ │ │ ├── skin │ │ │ │ ├── default │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ └── loading-2.gif │ │ │ │ ├── layer.ext.css │ │ │ │ └── moon │ │ │ │ │ └── style.css │ │ │ ├── laydate │ │ │ │ └── theme │ │ │ │ │ └── default │ │ │ │ │ └── font │ │ │ │ │ ├── iconfont.eot │ │ │ │ │ ├── iconfont.ttf │ │ │ │ │ ├── iconfont.woff │ │ │ │ │ └── iconfont.svg │ │ │ └── extend │ │ │ │ └── layer.ext.js │ │ ├── gritter │ │ │ ├── images │ │ │ │ ├── gritter.png │ │ │ │ ├── ie-spacer.gif │ │ │ │ └── gritter-light.png │ │ │ ├── jquery.gritter.css │ │ │ └── jquery.gritter.min.js │ │ ├── webuploader │ │ │ └── index.html │ │ ├── bootstrap-table │ │ │ ├── locale │ │ │ │ └── bootstrap-table-zh-CN.min.js │ │ │ └── bootstrap-table-mobile.min.js │ │ ├── markdown │ │ │ └── bootstrap-markdown.zh.js │ │ ├── validate │ │ │ └── messages_zh.min.js │ │ ├── prettyfile │ │ │ └── bootstrap-prettyfile.js │ │ ├── flot │ │ │ ├── jquery.flot.resize.js │ │ │ ├── jquery.flot.symbol.js │ │ │ └── jquery.flot.tooltip.min.js │ │ ├── summernote │ │ │ └── summernote-zh-CN.js │ │ ├── preetyTextDiff │ │ │ └── jquery.pretty-text-diff.min.js │ │ ├── peity │ │ │ └── jquery.peity.min.js │ │ ├── toastr │ │ │ └── toastr.min.js │ │ ├── metisMenu │ │ │ └── jquery.metisMenu.js │ │ └── slimscroll │ │ │ └── jquery.slimscroll.min.js │ │ ├── demo │ │ ├── peity-demo.min.js │ │ ├── sparkline-demo.min.js │ │ ├── form-validate-demo.min.js │ │ ├── rickshaw-demo.min.js │ │ ├── morris-demo.min.js │ │ ├── layer-demo.min.js │ │ ├── treeview-demo.min.js │ │ ├── bootstrap-table-demo.min.js │ │ └── form-advanced-demo.min.js │ │ ├── content.min.js │ │ ├── welcome.min.js │ │ └── textarea-extra.js └── views │ ├── index.blade.php │ ├── permission │ ├── create.blade.php │ ├── update.blade.php │ └── index.blade.php │ ├── auth │ ├── log.blade.php │ └── login.blade.php │ ├── role │ ├── create.blade.php │ ├── update.blade.php │ ├── index.blade.php │ └── menu.blade.php │ ├── layout_window.blade.php │ ├── user │ ├── create.blade.php │ └── update.blade.php │ └── menu │ └── index.blade.php ├── .gitignore ├── src ├── Guard.php ├── Models │ ├── Role.php │ ├── Permission.php │ ├── Menus.php │ ├── Connection.php │ ├── AdminUser.php │ └── AuthLog.php ├── Controllers │ ├── Controller.php │ ├── AuthLogController.php │ ├── HomeController.php │ ├── DemoController.php │ └── AuthController.php ├── Middleware │ ├── RoleMiddleware.php │ ├── PermissionMiddleware.php │ ├── RoleOrPermissionMiddleware.php │ ├── Authenticate.php │ ├── AuthLog.php │ └── MenuMiddleware.php ├── Commands │ ├── InstallCommand.php │ └── DBCommand.php └── tools.php ├── composer.json ├── config └── lazy-admin.config.php ├── LICENSE └── database ├── 2019_01_07_173148_create_tables.php └── 2019_01_07_025152_create_permission_tables.php /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=PHP 2 | *.css linguist-language=PHP 3 | *.html linguist-language=PHP -------------------------------------------------------------------------------- /resources/assets/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/bg.png -------------------------------------------------------------------------------- /resources/assets/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/icons.png -------------------------------------------------------------------------------- /resources/assets/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/user.png -------------------------------------------------------------------------------- /resources/assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/favicon.ico -------------------------------------------------------------------------------- /resources/assets/img/locked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/locked.png -------------------------------------------------------------------------------- /resources/assets/img/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/success.png -------------------------------------------------------------------------------- /resources/assets/img/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/progress.png -------------------------------------------------------------------------------- /resources/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /resources/assets/img/loading-upload.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/img/loading-upload.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | phpunit.phar 2 | /vendor 3 | composer.phar 4 | composer.lock 5 | *.project 6 | .idea/ 7 | .php_cs.cache 8 | .vscode/ 9 | *DS_Store -------------------------------------------------------------------------------- /resources/assets/css/patterns/shattered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/css/patterns/shattered.png -------------------------------------------------------------------------------- /resources/assets/css/plugins/iCheck/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/css/plugins/iCheck/green.png -------------------------------------------------------------------------------- /resources/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /resources/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /resources/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /resources/assets/js/plugins/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazywe/lazy-admin/HEAD/resources/assets/js/plugins/fancybox/blank.gif -------------------------------------------------------------------------------- /src/Guard.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/blueimp/img/error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/webuploader/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 |

Forbidden

6 |

You don't have permission to access /theme/hplus/js/plugins/webuploader/ 7 | on this server.

8 |
9 |
Apache Server at www.zi-han.net Port 80
10 | 11 | -------------------------------------------------------------------------------- /resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('lazy-view::layout') 2 | 3 | @section("head-title") 4 | {{config('lazy-admin.index-title')}} 5 | @endsection 6 | 7 | @section('content') 8 | Hello! Lazy Admin 9 | @endsection 10 | @push('scripts') 11 | 16 | @endpush 17 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/blueimp/img/play-pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | with('user')->paginate(20); 19 | return view('lazy-view::auth.log', compact('list')); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Models/Menus.php: -------------------------------------------------------------------------------- 1 | guard($guard)->user()->hasAnyRole(config("lazy-admin.super-role", "administrator"))) { 18 | return $next($request); 19 | } 20 | return parent::handle($request, $next, $role, $guard); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/switchery/switchery.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Main stylesheet for Switchery. 4 | * http://abpetkov.github.io/switchery/ 5 | * 6 | */ 7 | 8 | .switchery { 9 | background-color: #fff; 10 | border: 1px solid #dfdfdf; 11 | border-radius: 20px; 12 | cursor: pointer; 13 | display: inline-block; 14 | height: 30px; 15 | position: relative; 16 | vertical-align: middle; 17 | width: 50px; 18 | 19 | -webkit-box-sizing: content-box; 20 | -moz-box-sizing: content-box; 21 | box-sizing: content-box; 22 | } 23 | 24 | .switchery > small { 25 | background: #fff; 26 | border-radius: 100%; 27 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); 28 | height: 30px; 29 | position: absolute; 30 | top: 0; 31 | width: 30px; 32 | } 33 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-table - v1.9.0 - 2015-09-30 3 | * https://github.com/wenzhixin/bootstrap-table 4 | * Copyright (c) 2015 zhixin wen 5 | * Licensed MIT License 6 | */ 7 | !function(a){"use strict";a.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery); 8 | -------------------------------------------------------------------------------- /src/Models/Connection.php: -------------------------------------------------------------------------------- 1 | setConnection(config('lazy-admin.connection')); 16 | parent::__construct($attributes); 17 | 18 | if (method_exists($this, 'getCustomTableName')) { 19 | $this->setTable($this->getCustomTableName()); 20 | } 21 | } 22 | 23 | /** 24 | * 为数组 / JSON 序列化准备日期。 25 | * 26 | * @param \DateTimeInterface $date 27 | * @return string 28 | */ 29 | protected function serializeDate(DateTimeInterface $date) 30 | { 31 | return $date->format($this->dateFormat ?: 'Y-m-d H:i:s'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Models/AdminUser.php: -------------------------------------------------------------------------------- 1 | guard($guard)->user()->hasAnyRole(config("lazy-admin.super-role", "administrator"))) { 19 | return $next($request); 20 | } 21 | return parent::handle($request, $next, $permission, $guard); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/fullcalendar/fullcalendar.print.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FullCalendar v1.6.4 Print Stylesheet 3 | * Docs & License: http://arshaw.com/fullcalendar/ 4 | * (c) 2013 Adam Shaw 5 | */ 6 | 7 | /* 8 | * Include this stylesheet on your page to get a more printer-friendly calendar. 9 | * When including this stylesheet, use the media='print' attribute of the tag. 10 | * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. 11 | */ 12 | 13 | 14 | /* Events 15 | -----------------------------------------------------*/ 16 | 17 | .fc-event { 18 | background: #fff !important; 19 | color: #000 !important; 20 | } 21 | 22 | /* for vertical events */ 23 | 24 | .fc-event-bg { 25 | display: none !important; 26 | } 27 | 28 | .fc-event .ui-resizable-handle { 29 | display: none !important; 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/Middleware/RoleOrPermissionMiddleware.php: -------------------------------------------------------------------------------- 1 | guard($guard)->user()->hasAnyRole(config("lazy-admin.super-role", "administrator"))) { 20 | return $next($request); 21 | } 22 | return parent::handle($request, $next, $roleOrPermission, $guard); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Models/AuthLog.php: -------------------------------------------------------------------------------- 1 | 'array' 13 | ]; 14 | 15 | /** 16 | * The attributes that are mass assignable. 17 | * 18 | * @var array 19 | */ 20 | protected $fillable = [ 21 | 'uri', 22 | 'ip', 23 | 'method', 24 | 'params', 25 | 'user_id', 26 | 'created_at', 27 | 'updated_at' 28 | ]; 29 | 30 | public function user() 31 | { 32 | return $this->belongsTo(AdminUser::class, 'user_id', 'id'); 33 | } 34 | 35 | /** 36 | * 自定义table 37 | * 38 | * @return void 39 | */ 40 | protected function getCustomTableName() 41 | { 42 | return config("lazy-admin.table_names.log"); 43 | } 44 | } -------------------------------------------------------------------------------- /resources/assets/js/welcome.min.js: -------------------------------------------------------------------------------- 1 | layer.config({ 2 | extend: ["extend/layer.ext.js", "skin/moon/style.css"], 3 | skin: "layer-ext-moon" 4 | }), 5 | layer.ready(function() { 6 | function e() { 7 | parent.layer.open({ 8 | title: "初见倾心,再见动情", 9 | type: 1, 10 | area: ["700px", "auto"], 11 | content: t, 12 | btn: ["确定", "取消"] 13 | }) 14 | } 15 | var t = $("#welcome-template").html(); 16 | $("a.viewlog").click(function() { 17 | return e(), 18 | !1 19 | }), 20 | $("#pay-qrcode").click(function() { 21 | var e = $(this).html(); 22 | parent.layer.open({ 23 | title: !1, 24 | type: 1, 25 | closeBtn: !1, 26 | shadeClose: !0, 27 | area: ["600px", "auto"], 28 | content: e 29 | }) 30 | }), 31 | console.log("欢迎使用H+,如果您在使用的过程中有碰到问题,可以参考开发文档,感谢您的支持。") 32 | }); -------------------------------------------------------------------------------- /resources/assets/js/plugins/markdown/bootstrap-markdown.zh.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Chinese translation for bootstrap-markdown 3 | * benhaile 4 | */ 5 | (function ($) { 6 | $.fn.markdown.messages.zh = { 7 | 'Bold': "粗体", 8 | 'Italic': "斜体", 9 | 'Heading': "标题", 10 | 'URL/Link': "链接", 11 | 'Image': "图片", 12 | 'List': "列表", 13 | 'Unordered List': "无序列表", 14 | 'Ordered List': "有序列表", 15 | 'Code': "代码", 16 | 'Quote': "引用", 17 | 'Preview': "预览", 18 | 'strong text': "粗体", 19 | 'emphasized text': "强调", 20 | 'heading text': "标题", 21 | 'enter link description here': "输入链接说明", 22 | 'Insert Hyperlink': "URL地址", 23 | 'enter image description here': "输入图片说明", 24 | 'Insert Image Hyperlink': "图片URL地址", 25 | 'enter image title here': "在这里输入图片标题", 26 | 'list text here': "这里是列表文本", 27 | 'code text here': "这里输入代码", 28 | 'quote here': "这里输入引用文本" 29 | 30 | 31 | }; 32 | }(jQuery)); 33 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lazywe/lazy-admin", 3 | "description": "基于laravel的rbac后台系统", 4 | "keywords": [ 5 | "admin", 6 | "rbac", 7 | "laravel", 8 | "laravel admin" 9 | ], 10 | "authors": [ 11 | { 12 | "name": "lazywe", 13 | "email": "lazywe@163.com" 14 | } 15 | ], 16 | "license": "MIT", 17 | "require": { 18 | "spatie/laravel-permission": "^3.3.0" 19 | }, 20 | "require-dev": { 21 | "phpunit/phpunit": "^7.5" 22 | }, 23 | "autoload": { 24 | "psr-4": { 25 | "Lazy\\Admin\\": "src/" 26 | }, 27 | "files": [ 28 | "src/tools.php" 29 | ] 30 | }, 31 | "extra": { 32 | "laravel": { 33 | "providers": [ 34 | "Lazy\\Admin\\ServiceProvider", 35 | "Spatie\\Permission\\PermissionServiceProvider" 36 | ] 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /config/lazy-admin.config.php: -------------------------------------------------------------------------------- 1 | "lazy", 8 | 9 | /** 10 | * 后台名称 11 | */ 12 | 'name' => "管理后台", 13 | 14 | /** 15 | * 后台入口前缀 16 | */ 17 | 'prefix' => "admin", 18 | 19 | /** 20 | * 后台首页地址 routeName 21 | */ 22 | 'index' => "lazy-admin.home", 23 | /** 24 | * 后台首页名称 25 | */ 26 | 'index-title' => "Dashboard", 27 | /** 28 | * 超级角色 29 | */ 30 | 'super-role' => [ 31 | "administrator" 32 | ], 33 | /** 34 | * 自定义数据库链接 35 | */ 36 | 'connection' => "mysql", 37 | 38 | /** 39 | * 自定义table名字 40 | */ 41 | 'table_names' => [ 42 | "user" => "admin_users", // 后台用户名字 43 | "log" => "admin_auth_log", // 后台日志名 44 | "menu" => "admin_menus" // 后台栏目名字 45 | ], 46 | /** 47 | * cdn更新 48 | */ 49 | 'timestamp' => "2019070069", 50 | ]; 51 | -------------------------------------------------------------------------------- /src/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | guest()) { 25 | // ajax 处理 26 | if ($request->ajax()) { 27 | // 讲当前的url设置成掉线的url 28 | return ajaxReturn(403, "login error.", [ 29 | 'url' => route('lazy-admin.login') 30 | ]); 31 | } 32 | // 讲当前的url设置成掉线的url 33 | return redirect()->route('lazy-admin.login'); 34 | } 35 | 36 | return $next($request); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Middleware/AuthLog.php: -------------------------------------------------------------------------------- 1 | path(); 24 | $ip = $request->getClientIp(); 25 | $method = $request->method(); 26 | $params = $request->all(); 27 | $userId = Auth::guard($guardName)->id()??0; 28 | // 创建日志 29 | ModelsAuthLog::create([ 30 | 'uri' => $uri, 31 | 'ip' => $ip, 32 | 'method' => $method, 33 | 'params' => $params, 34 | 'user_id' => $userId, 35 | ]); 36 | return $next($request); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Controllers/DemoController.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /resources/assets/js/demo/sparkline-demo.min.js: -------------------------------------------------------------------------------- 1 | $(function(){$("#sparkline1").sparkline([34,43,43,35,44,32,44,52,25],{type:"line",lineColor:"#17997f",fillColor:"#1ab394"}),$("#sparkline2").sparkline([5,6,7,2,0,-4,-2,4],{type:"bar",barColor:"#1ab394",negBarColor:"#c6c6c6"}),$("#sparkline3").sparkline([1,1,2],{type:"pie",sliceColors:["#1ab394","#b3b3b3","#e4f0fb"]}),$("#sparkline4").sparkline([34,43,43,35,44,32,15,22,46,33,86,54,73,53,12,53,23,65,23,63,53,42,34,56,76,15,54,23,44],{type:"line",lineColor:"#17997f",fillColor:"#ffffff"}),$("#sparkline5").sparkline([1,1,0,1,-1,-1,1,-1,0,0,1,1],{type:"tristate",posBarColor:"#1ab394",negBarColor:"#bfbfbf"}),$("#sparkline6").sparkline([4,6,7,7,4,3,2,1,4,4,5,6,3,4,5,8,7,6,9,3,2,4,1,5,6,4,3,7],{type:"discrete",lineColor:"#1ab394"}),$("#sparkline7").sparkline([52,12,44],{type:"pie",height:"150px",sliceColors:["#1ab394","#b3b3b3","#e4f0fb"]}),$("#sparkline8").sparkline([5,6,7,2,0,4,2,4,5,7,2,4,12,14,4,2,14,12,7],{type:"bar",barWidth:8,height:"150px",barColor:"#1ab394",negBarColor:"#c6c6c6"}),$("#sparkline9").sparkline([34,43,43,35,44,32,15,22,46,33,86,54,73,53,12,53,23,65,23,63,53,42,34,56,76,15,54,23,44],{type:"line",lineWidth:1,height:"150px",lineColor:"#17997f",fillColor:"#ffffff"})}); 2 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/treeview/bootstrap-treeview.css: -------------------------------------------------------------------------------- 1 | /* ========================================================= 2 | * bootstrap-treeview.css v1.0.0 3 | * ========================================================= 4 | * Copyright 2013 Jonathan Miles 5 | * Project URL : http://www.jondmiles.com/bootstrap-treeview 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================= */ 19 | 20 | .list-group-item { 21 | cursor: pointer; 22 | } 23 | 24 | /*.list-group-item:hover { 25 | background-color: #f5f5f5; 26 | }*/ 27 | 28 | span.indent { 29 | margin-left: 10px; 30 | margin-right: 10px; 31 | } 32 | 33 | span.icon { 34 | margin-right: 5px; 35 | } 36 | -------------------------------------------------------------------------------- /resources/assets/js/demo/form-validate-demo.min.js: -------------------------------------------------------------------------------- 1 | $.validator.setDefaults({highlight:function(e){$(e).closest(".form-group").removeClass("has-success").addClass("has-error")},success:function(e){e.closest(".form-group").removeClass("has-error").addClass("has-success")},errorElement:"span",errorPlacement:function(e,r){e.appendTo(r.is(":radio")||r.is(":checkbox")?r.parent().parent().parent():r.parent())},errorClass:"help-block m-b-none",validClass:"help-block m-b-none"}),$().ready(function(){$("#commentForm").validate();var e=" ";$("#signupForm").validate({rules:{firstname:"required",lastname:"required",username:{required:!0,minlength:2},password:{required:!0,minlength:5},confirm_password:{required:!0,minlength:5,equalTo:"#password"},email:{required:!0,email:!0},topic:{required:"#newsletter:checked",minlength:2},agree:"required"},messages:{firstname:e+"请输入你的姓",lastname:e+"请输入您的名字",username:{required:e+"请输入您的用户名",minlength:e+"用户名必须两个字符以上"},password:{required:e+"请输入您的密码",minlength:e+"密码必须5个字符以上"},confirm_password:{required:e+"请再次输入密码",minlength:e+"密码必须5个字符以上",equalTo:e+"两次输入的密码不一致"},email:e+"请输入您的E-mail",agree:{required:e+"必须同意协议后才能注册",element:"#agree-error"}}}),$("#username").focus(function(){var e=$("#firstname").val(),r=$("#lastname").val();e&&r&&!this.value&&(this.value=e+"."+r)})}); 2 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/validate/messages_zh.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Validation Plugin - v1.13.1 - 10/14/2014 2 | * http://jqueryvalidation.org/ 3 | * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */ 4 | ! function (a) { 5 | "function" == typeof define && define.amd ? define(["jquery", "jquery.validate.min"], a) : a(jQuery) 6 | }(function (a) { 7 | var icon = " "; 8 | a.extend(a.validator.messages, { 9 | required: icon + "必填", 10 | remote: icon + "请修正此栏位", 11 | email: icon + "请输入有效的电子邮件", 12 | url: icon + "请输入有效的网址", 13 | date: icon + "请输入有效的日期", 14 | dateISO: icon + "请输入有效的日期 (YYYY-MM-DD)", 15 | number: icon + "请输入正确的数字", 16 | digits: icon + "只能输入数字", 17 | creditcard: icon + "请输入有效的信用卡号码", 18 | equalTo: icon + "你的输入不相同", 19 | extension: icon + "请输入有效的后缀", 20 | maxlength: a.validator.format(icon + "最多 {0} 个字"), 21 | minlength: a.validator.format(icon + "最少 {0} 个字"), 22 | rangelength: a.validator.format(icon + "请输入长度为 {0} 至 {1} 之间的字串"), 23 | range: a.validator.format(icon + "请输入 {0} 至 {1} 之间的数值"), 24 | max: a.validator.format(icon + "请输入不大于 {0} 的数值"), 25 | min: a.validator.format(icon + "请输入不小于 {0} 的数值") 26 | }) 27 | }); 28 | -------------------------------------------------------------------------------- /resources/assets/css/login.min.css: -------------------------------------------------------------------------------- 1 | html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0 0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}} 2 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/iCheck/custom.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, green 2 | ----------------------------------- */ 3 | .icheckbox_square-green, 4 | .iradio_square-green { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(green.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-green { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-green.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-green.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-green.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-green.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-green { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-green.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-green.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-green.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-green.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-green, 54 | .iradio_square-green { 55 | background-image: url(green%402x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-table - v1.9.0 - 2015-09-30 3 | * https://github.com/wenzhixin/bootstrap-table 4 | * Copyright (c) 2015 zhixin wen 5 | * Licensed MIT License 6 | */ 7 | !function(a){"use strict";var b=function(b,c){b.options.columnsHidden.length>0&&a.each(b.columns,function(d,e){-1!==b.options.columnsHidden.indexOf(e.field)&&e.visible!==c&&b.toggleColumn(a.fn.bootstrapTable.utils.getFieldIndex(b.columns,e.field),c,!0)})},c=function(a){(a.options.height||a.options.showFooter)&&setTimeout(a.resetView,1)},d=function(a,b,d){a.options.minHeight?b<=a.options.minWidth&&d<=a.options.minHeight?e(a):b>a.options.minWidth&&d>a.options.minHeight&&f(a):b<=a.options.minWidth?e(a):b>a.options.minWidth&&f(a),c(a)},e=function(a){g(a,!1),b(a,!1)},f=function(a){g(a,!0),b(a,!0)},g=function(a,b){a.options.cardView=b,a.toggleView()},h=function(a,b){var c;return function(){var d=this,e=arguments,f=function(){c=null,a.apply(d,e)};clearTimeout(c),c=setTimeout(f,b)}};a.extend(a.fn.bootstrapTable.defaults,{mobileResponsive:!1,minWidth:562,minHeight:void 0,heightThreshold:100,checkOnInit:!0,columnsHidden:[]});var i=a.fn.bootstrapTable.Constructor,j=i.prototype.init;i.prototype.init=function(){if(j.apply(this,Array.prototype.slice.apply(arguments)),this.options.mobileResponsive&&this.options.minWidth){var b=this,c={width:a(window).width(),height:a(window).height()};if(a(window).on("resize orientationchange",h(function(){var e=a(this).height(),f=a(this).width();(Math.abs(c.height-e)>b.options.heightThreshold||c.width!=f)&&(d(b,f,e),c={width:f,height:e})},200)),this.options.checkOnInit){var e=a(window).height(),f=a(window).width();d(this,f,e),c={width:f,height:e}}}}}(jQuery); 8 | -------------------------------------------------------------------------------- /resources/assets/js/textarea-extra.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | /* 在textarea处插入文本--Start */ 3 | (function($) { 4 | $.fn.extend({ 5 | insertContent : function(myValue, t) { 6 | var $t = $(this)[0]; 7 | if (document.selection) { // ie 8 | this.focus(); 9 | var sel = document.selection.createRange(); 10 | sel.text = myValue; 11 | this.focus(); 12 | sel.moveStart('character', -l); 13 | var wee = sel.text.length; 14 | if (arguments.length == 2) { 15 | var l = $t.value.length; 16 | sel.moveEnd("character", wee + t); 17 | t <= 0 ? sel.moveStart("character", wee - 2 * t - myValue.length) 18 | : sel.moveStart("character", wee - t - myValue.length); 19 | sel.select(); 20 | } 21 | } else if ($t.selectionStart || $t.selectionStart == '0') { 22 | var startPos = $t.selectionStart; 23 | var endPos = $t.selectionEnd; 24 | var scrollTop = $t.scrollTop; 25 | $t.value = $t.value.substring(0, startPos) + myValue 26 | + $t.value.substring(endPos, $t.value.length); 27 | this.focus(); 28 | $t.selectionStart = startPos + myValue.length; 29 | $t.selectionEnd = startPos + myValue.length; 30 | $t.scrollTop = scrollTop; 31 | if (arguments.length == 2) { 32 | $t.setSelectionRange(startPos - t, $t.selectionEnd + t); 33 | this.focus(); 34 | } 35 | } else { 36 | this.value += myValue; 37 | this.focus(); 38 | } 39 | } 40 | }) 41 | })(jQuery); 42 | /* 在textarea处插入文本--Ending */ 43 | }); 44 | -------------------------------------------------------------------------------- /resources/assets/js/demo/rickshaw-demo.min.js: -------------------------------------------------------------------------------- 1 | $(function(){var e=new Rickshaw.Graph({element:document.querySelector("#chart"),series:[{color:"#1ab394",data:[{x:0,y:40},{x:1,y:49},{x:2,y:38},{x:3,y:30},{x:4,y:32}]}]});e.render();var r=new Rickshaw.Graph({element:document.querySelector("#rickshaw_multi"),renderer:"area",stroke:!0,series:[{data:[{x:0,y:40},{x:1,y:49},{x:2,y:38},{x:3,y:20},{x:4,y:16}],color:"#1ab394",stroke:"#17997f"},{data:[{x:0,y:22},{x:1,y:25},{x:2,y:38},{x:3,y:44},{x:4,y:46}],color:"#eeeeee",stroke:"#d7d7d7"}]});r.renderer.unstack=!0,r.render();var a=new Rickshaw.Graph({element:document.querySelector("#rickshaw_line"),renderer:"line",series:[{data:[{x:0,y:40},{x:1,y:49},{x:2,y:38},{x:3,y:30},{x:4,y:32}],color:"#1ab394"}]});a.render();var y=new Rickshaw.Graph({element:document.querySelector("#rickshaw_multi_line"),renderer:"line",series:[{data:[{x:0,y:40},{x:1,y:49},{x:2,y:38},{x:3,y:30},{x:4,y:32}],color:"#1ab394"},{data:[{x:0,y:20},{x:1,y:24},{x:2,y:19},{x:3,y:15},{x:4,y:16}],color:"#d7d7d7"}]});y.render();var x=new Rickshaw.Graph({element:document.querySelector("#rickshaw_bars"),renderer:"bar",series:[{data:[{x:0,y:40},{x:1,y:49},{x:2,y:38},{x:3,y:30},{x:4,y:32}],color:"#1ab394"}]});x.render();var t=new Rickshaw.Graph({element:document.querySelector("#rickshaw_bars_stacked"),renderer:"bar",series:[{data:[{x:0,y:40},{x:1,y:49},{x:2,y:38},{x:3,y:30},{x:4,y:32}],color:"#1ab394"},{data:[{x:0,y:20},{x:1,y:24},{x:2,y:19},{x:3,y:15},{x:4,y:16}],color:"#d7d7d7"}]});t.render();var c=new Rickshaw.Graph({element:document.querySelector("#rickshaw_scatterplot"),renderer:"scatterplot",stroke:!0,padding:{top:.05,left:.05,right:.05},series:[{data:[{x:0,y:15},{x:1,y:18},{x:2,y:10},{x:3,y:12},{x:4,y:15},{x:5,y:24},{x:6,y:28},{x:7,y:31},{x:8,y:22},{x:9,y:18},{x:10,y:16}],color:"#1ab394"}]});c.render()}); 2 | -------------------------------------------------------------------------------- /resources/assets/js/demo/morris-demo.min.js: -------------------------------------------------------------------------------- 1 | $(function(){Morris.Line({element:"morris-one-line-chart",data:[{year:"2008",value:5},{year:"2009",value:10},{year:"2010",value:8},{year:"2011",value:22},{year:"2012",value:8},{year:"2014",value:10},{year:"2015",value:5}],xkey:"year",ykeys:["value"],resize:!0,lineWidth:4,labels:["Value"],lineColors:["#1ab394"],pointSize:5}),Morris.Area({element:"morris-area-chart",data:[{period:"2010 Q1",iphone:2666,ipad:null,itouch:2647},{period:"2010 Q2",iphone:2778,ipad:2294,itouch:2441},{period:"2010 Q3",iphone:4912,ipad:1969,itouch:2501},{period:"2010 Q4",iphone:3767,ipad:3597,itouch:5689},{period:"2011 Q1",iphone:6810,ipad:1914,itouch:2293},{period:"2011 Q2",iphone:5670,ipad:4293,itouch:1881},{period:"2011 Q3",iphone:4820,ipad:3795,itouch:1588},{period:"2011 Q4",iphone:15073,ipad:5967,itouch:5175},{period:"2012 Q1",iphone:10687,ipad:4460,itouch:2028},{period:"2012 Q2",iphone:8432,ipad:5713,itouch:1791}],xkey:"period",ykeys:["iphone","ipad","itouch"],labels:["iPhone","iPad","iPod Touch"],pointSize:2,hideHover:"auto",resize:!0,lineColors:["#87d6c6","#54cdb4","#1ab394"],lineWidth:2,pointSize:1}),Morris.Donut({element:"morris-donut-chart",data:[{label:"A系列",value:12},{label:"B系列",value:30},{label:"C系列",value:20}],resize:!0,colors:["#87d6c6","#54cdb4","#1ab394"]}),Morris.Bar({element:"morris-bar-chart",data:[{y:"2006",a:60,b:50},{y:"2007",a:75,b:65},{y:"2008",a:50,b:40},{y:"2009",a:75,b:65},{y:"2010",a:50,b:40},{y:"2011",a:75,b:65},{y:"2012",a:100,b:90}],xkey:"y",ykeys:["a","b"],labels:["A系列","B系列"],hideHover:"auto",resize:!0,barColors:["#1ab394","#cacaca"]}),Morris.Line({element:"morris-line-chart",data:[{y:"2006",a:100,b:90},{y:"2007",a:75,b:65},{y:"2008",a:50,b:40},{y:"2009",a:75,b:65},{y:"2010",a:50,b:40},{y:"2011",a:75,b:65},{y:"2012",a:100,b:90}],xkey:"y",ykeys:["a","b"],labels:["A系列","B系列"],hideHover:"auto",resize:!0,lineColors:["#54cdb4","#1ab394"]})}); 2 | -------------------------------------------------------------------------------- /src/Middleware/MenuMiddleware.php: -------------------------------------------------------------------------------- 1 | session()->get('lazy-admin-menus'); 18 | // if (empty($menus)) { 19 | // $menus = Menus::select('uri', 'roles')->get(); 20 | // // dd($menus); 21 | // $request->session()->put('lazy-admin-menus', $menus); 22 | // } 23 | // // dd($menus); 24 | 25 | $path = $request->path(); 26 | $pathArr = Str::of($path)->explode("/"); 27 | $prefix = config('lazy-admin.prefix'); 28 | if (!empty($prefix) && count($pathArr) > 0 && $pathArr[0] == $prefix) { 29 | unset($pathArr[0]); 30 | } 31 | if (empty($pathArr)) { 32 | return $next($request); 33 | } 34 | $sourceUri = collect($pathArr)->join("/"); 35 | $menuInfo = Menus::where('uri', $sourceUri)->select(['roles'])->first(); 36 | if (empty($menuInfo)) { 37 | return $next($request); 38 | } 39 | $guardName = Guard::ADMIN_GUARD; 40 | // 超级管理员过 41 | if (app('auth')->guard($guardName)->user()->hasAnyRole(config("lazy-admin.super-role", "administrator"))) { 42 | return $next($request); 43 | } 44 | // 验证当前用户,当前菜单 45 | $roles = Str::of($menuInfo->roles)->explode(",")->join("|"); 46 | if (!(app('auth')->guard($guardName)->user()->hasAnyRole([$roles]))) { 47 | throw UnauthorizedException::forPermissions([]); 48 | } 49 | return $next($request); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Commands/InstallCommand.php: -------------------------------------------------------------------------------- 1 | info("==================== 开始安装 ====================="); 42 | $start = microtime(true); 43 | $this->publish(); 44 | $end = microtime(true); 45 | $t = round($end-$start); 46 | $this->info("================ 配置生成结束,运行{$t}秒 ================="); 47 | } 48 | 49 | /** 50 | * public config 51 | * 52 | * @return void 53 | */ 54 | public function publish() 55 | { 56 | // 生成配置 57 | $this->info("生成配置"); 58 | $this->call('vendor:publish', ["--provider"=>"Lazy\Admin\ServiceProvider", "--tag" => "permission"]); 59 | $this->call('vendor:publish', ["--provider" => "Lazy\Admin\ServiceProvider", "--tag" => "lazy-admin-config"]); 60 | 61 | // 生成静态文件 62 | $this->info("生成静态资源"); 63 | $this->call('vendor:publish', ["--provider"=>"Lazy\Admin\ServiceProvider", "--tag" => "lazy-admin-assets"]); 64 | 65 | // 生成静态文件 66 | $this->info("生成数据库文件"); 67 | $this->call('vendor:publish', ["--provider"=>"Lazy\Admin\ServiceProvider", "--tag" => "lazy-admin-migrations"]); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /resources/views/permission/create.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @section('content') 5 |
6 |
7 |
8 |
9 |
添加权限
10 | 11 |
12 | 15 |
16 | 17 |
18 |
19 |
20 |
21 | 22 |
23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 |
31 |
32 |
33 |
34 | 35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | @endsection 44 | @push('scripts') 45 | 50 | @endpush -------------------------------------------------------------------------------- /resources/views/permission/update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @section('content') 5 |
6 |
7 |
8 |
9 |
修改权限
10 | 11 |
12 | 15 |
16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 |
24 | 25 |
26 |
27 |
28 | 29 |
30 | 31 |
32 |
33 |
34 |
35 | 36 | 37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | @endsection 45 | @push('scripts') 46 | 51 | @endpush -------------------------------------------------------------------------------- /resources/assets/js/plugins/prettyfile/bootstrap-prettyfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery and Bootsrap3 Plugin prettyFile 3 | * 4 | * version 2.0, Jan 20th, 2014 5 | * by episage, sujin2f 6 | * Git repository : https://github.com/episage/bootstrap-3-pretty-file-upload 7 | */ 8 | ( function( $ ) { 9 | $.fn.extend({ 10 | prettyFile: function( options ) { 11 | var defaults = { 12 | text : "选择文件" 13 | }; 14 | 15 | var options = $.extend(defaults, options); 16 | var plugin = this; 17 | 18 | function make_form( $el, text ) { 19 | $el.wrap('
'); 20 | 21 | $el.hide(); 22 | $el.after( '\ 23 |
\ 24 | \ 25 | \ 26 | \ 27 | \ 28 |
\ 29 | ' ); 30 | 31 | return $el.parent(); 32 | }; 33 | 34 | function bind_change( $wrap, multiple ) { 35 | $wrap.find( 'input[type="file"]' ).change(function () { 36 | // When original file input changes, get its value, show it in the fake input 37 | var files = $( this )[0].files, 38 | info = ''; 39 | 40 | if ( files.length == 0 ) 41 | return false; 42 | 43 | if ( !multiple || files.length == 1 ) { 44 | var path = $( this ).val().split('\\'); 45 | info = path[path.length - 1]; 46 | } else if ( files.length > 1 ) { 47 | // Display number of selected files instead of filenames 48 | info = "已选择了" + files.length + ' 个文件'; 49 | } 50 | 51 | $wrap.find('.input-append input').val( info ); 52 | }); 53 | }; 54 | 55 | function bind_button( $wrap, multiple ) { 56 | $wrap.find( '.input-append' ).click( function( e ) { 57 | e.preventDefault(); 58 | $wrap.find( 'input[type="file"]' ).click(); 59 | }); 60 | }; 61 | 62 | return plugin.each( function() { 63 | $this = $( this ); 64 | 65 | if ( $this ) { 66 | var multiple = $this.attr( 'multiple' ); 67 | 68 | $wrap = make_form( $this, options.text ); 69 | bind_change( $wrap, multiple ); 70 | bind_button( $wrap ); 71 | } 72 | }); 73 | } 74 | }); 75 | }( jQuery )); 76 | 77 | -------------------------------------------------------------------------------- /resources/assets/js/demo/layer-demo.min.js: -------------------------------------------------------------------------------- 1 | !function(){var e={htdy:$("html, body")};e.demo1=$("#demo1"),$("#chutiyan>a").on("click",function(){var t=$(this),a=t.index(),r=e.demo1.children("p").eq(a),n=r.position().top;switch(e.demo1.animate({scrollTop:e.demo1.scrollTop()+n},0),a){case 0:var o=-1;!function s(){var e=parent.layer.alert("点击确认更换图标",{icon:o,shadeClose:!0,title:-1===o?"初体验":"icon:"+o},s);8===++o&&layer.close(e)}();break;case 1:var o=0;!function p(){parent.layer.alert("点击确认更换图标",{icon:o,shadeClose:!0,skin:"layer-ext-moon",shift:5,title:-1===o?"第三方扩展皮肤":"icon:"+o},p);9===++o&&parent.layer.confirm("怎么样,是否很喜欢该皮肤,去下载?",{skin:"layer-ext-moon"},function(e,t){t.find(".layui-layer-btn0").attr({href:"http://layer.layui.com/skin.html",target:"_blank"}),parent.layer.close(e)})}();break;case 6:parent.layer.open({type:1,area:["420px","240px"],skin:"layui-layer-rim",content:'
即直接给content传入html字符
当内容宽高超过定义宽高,会自动出现滚动条。










很高兴在下面遇见你
'});break;case 7:parent.layer.open({type:1,skin:"layui-layer-demo",closeBtn:!1,area:"350px",shift:2,shadeClose:!0,content:'
即传入skin:"样式名",然后你就可以为所欲为了。
你怎么样给她整容都行


我是华丽的酱油==。
'});break;case 8:layer.tips("Hi,我是tips",this);break;case 11:var i=parent.layer.load(0,{shade:!1});setTimeout(function(){parent.layer.close(i)},5e3);break;case 12:var l=parent.layer.load(1,{shade:[.1,"#fff"]});setTimeout(function(){parent.layer.close(l)},3e3);break;case 13:layer.tips("我是另外一个tips,只不过我长得跟之前那位稍有些不一样。",this,{tips:[1,"#3595CC"],time:4e3});break;case 14:parent.layer.prompt({title:"输入任何口令,并确认",formType:1},function(e){parent.layer.prompt({title:"随便写点啥,并确认",formType:2},function(t){parent.layer.msg("演示完毕!您的口令:"+e+"
您最后写下了:"+t)})});break;case 15:parent.layer.tab({area:["600px","300px"],tab:[{title:"无题",content:'
欢迎体验layer.tab
此时此刻不禁让人吟诗一首:
一入前端深似海
从此妹纸是浮云
以下省略七个字
。。。。。。。
——贤心
'},{title:"TAB2",content:'
TAB2该说些啥
'},{title:"TAB3",content:'
有一种坚持叫:layer
'}]});break;case 16:e.photoJSON?layer.photos({photos:e.photoJSON}):$.getJSON("js/demo/photos.json?v=",function(t){e.photoJSON=t,layer.photos({photos:t})});break;default:new Function(r.text())()}})}(); 2 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css: -------------------------------------------------------------------------------- 1 | /* Ion.RangeSlider, Flat UI Skin 2 | // css version 1.8.5 3 | // by Denis Ineshin | ionden.com 4 | // ===================================================================================================================*/ 5 | 6 | /* ===================================================================================================================== 7 | // Skin details */ 8 | 9 | .irs-line-mid, 10 | .irs-line-left, 11 | .irs-line-right, 12 | .irs-diapason, 13 | .irs-slider { 14 | background: url(../images/sprite-skin-flat.png) repeat-x; 15 | } 16 | 17 | .irs { 18 | height: 40px; 19 | } 20 | .irs-with-grid { 21 | height: 60px; 22 | } 23 | .irs-line { 24 | height: 12px; top: 25px; 25 | } 26 | .irs-line-left { 27 | height: 12px; 28 | background-position: 0 -30px; 29 | } 30 | .irs-line-mid { 31 | height: 12px; 32 | background-position: 0 0; 33 | } 34 | .irs-line-right { 35 | height: 12px; 36 | background-position: 100% -30px; 37 | } 38 | 39 | .irs-diapason { 40 | height: 12px; top: 25px; 41 | background-position: 0 -60px; 42 | } 43 | 44 | .irs-slider { 45 | width: 16px; height: 18px; 46 | top: 22px; 47 | background-position: 0 -90px; 48 | } 49 | #irs-active-slider, .irs-slider:hover { 50 | background-position: 0 -120px; 51 | } 52 | 53 | .irs-min, .irs-max { 54 | color: #999; 55 | font-size: 10px; line-height: 1.333; 56 | text-shadow: none; 57 | top: 0; padding: 1px 3px; 58 | background: #e1e4e9; 59 | border-radius: 4px; 60 | } 61 | 62 | .irs-from, .irs-to, .irs-single { 63 | color: #fff; 64 | font-size: 10px; line-height: 1.333; 65 | text-shadow: none; 66 | padding: 1px 5px; 67 | background: #ed5565; 68 | border-radius: 4px; 69 | } 70 | .irs-from:after, .irs-to:after, .irs-single:after { 71 | position: absolute; display: block; content: ""; 72 | bottom: -6px; left: 50%; 73 | width: 0; height: 0; 74 | margin-left: -3px; 75 | overflow: hidden; 76 | border: 3px solid transparent; 77 | border-top-color: #ed5565; 78 | } 79 | 80 | 81 | .irs-grid-pol { 82 | background: #e1e4e9; 83 | } 84 | .irs-grid-text { 85 | color: #999; 86 | } 87 | 88 | .irs-disabled { 89 | } 90 | -------------------------------------------------------------------------------- /database/2019_01_07_173148_create_tables.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->string('name'); 20 | $table->string('real_name'); 21 | $table->string('email')->unique("email"); 22 | $table->timestamp('email_verified_at')->nullable(); 23 | $table->string('guard_name'); 24 | $table->string('password'); 25 | $table->rememberToken(); 26 | 27 | $table->timestamps(); 28 | }); 29 | // 创建目录表 30 | Schema::create($tableNames['menu'], function (Blueprint $table) { 31 | $table->increments('id'); 32 | $table->integer('parent_id')->default(0); 33 | $table->integer('order')->default(0); 34 | $table->string('title', 50); 35 | $table->string('icon', 50)->nullable(); 36 | $table->string('uri', 50)->nullable(); 37 | $table->string('roles')->nullable(); 38 | 39 | $table->timestamps(); 40 | }); 41 | // 创建日志表 42 | Schema::create($tableNames['log'], function (Blueprint $table) { 43 | $table->increments('id'); 44 | $table->integer('user_id')->default(0); 45 | $table->string('ip', 15); 46 | $table->string('method', 10)->nullable(); 47 | $table->string('uri', 255)->nullable(); 48 | $table->text('params')->nullable(); 49 | 50 | $table->timestamps(); 51 | }); 52 | } 53 | 54 | /** 55 | * Reverse the migrations. 56 | * 57 | * @return void 58 | */ 59 | public function down() 60 | { 61 | $tableNames = config('lazy-admin.table_names'); 62 | Schema::dropIfExists($tableNames['user']); 63 | Schema::dropIfExists($tableNames['menu']); 64 | Schema::dropIfExists($tableNames['log']); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/Commands/DBCommand.php: -------------------------------------------------------------------------------- 1 | info("==================== 开始安装 ====================="); 43 | $start = microtime(true); 44 | $this->info("生成数据库文件"); 45 | $this->makeSchema(); 46 | $end = microtime(true); 47 | $t = round($end-$start); 48 | $this->info("================ 安装结束,运行{$t}秒 ================="); 49 | } 50 | 51 | /** 52 | * 生成数据库文件 53 | * 54 | * @return void 55 | */ 56 | public function makeSchema() 57 | { 58 | if (Schema::connection(config('lazy-admin.connection'))->hasTable('model_has_permissions') 59 | || Schema::connection(config('lazy-admin.connection'))->hasTable('model_has_roles') 60 | || Schema::connection(config('lazy-admin.connection'))->hasTable('password_resets') 61 | || Schema::connection(config('lazy-admin.connection'))->hasTable('permissions') 62 | || Schema::connection(config('lazy-admin.connection'))->hasTable('role_has_permissions') 63 | || Schema::connection(config('lazy-admin.connection'))->hasTable('roles') 64 | || Schema::connection(config('lazy-admin.connection'))->hasTable('admin_users')) { 65 | $this->info("表结构已经存在, 若重新安装请删除"); 66 | return false; 67 | } 68 | // 生成表结构数据 69 | $this->call('vendor:publish', ["--provider"=>"Lazy\Admin\ServiceProvider", "--tag" => "lazy-admin-migrations"]); 70 | // 创建表 71 | $this->call('migrate', ["--database" => config('lazy-admin.connection')]); 72 | // 生成数据库文件 73 | $this->call('db:seed', ['--class' => \Lazy\Admin\Models\DbSeeder::class]); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /resources/assets/js/demo/treeview-demo.min.js: -------------------------------------------------------------------------------- 1 | $(function(){var e=[{text:"父节点 1",href:"#parent1",tags:["4"],nodes:[{text:"子节点 1",href:"#child1",tags:["2"],nodes:[{text:"孙子节点 1",href:"#grandchild1",tags:["0"]},{text:"孙子节点 2",href:"#grandchild2",tags:["0"]}]},{text:"子节点 2",href:"#child2",tags:["0"]}]},{text:"父节点 2",href:"#parent2",tags:["0"]},{text:"父节点 3",href:"#parent3",tags:["0"]},{text:"父节点 4",href:"#parent4",tags:["0"]},{text:"父节点 5",href:"#parent5",tags:["0"]}],o=[{text:"父节点 1",tags:["2"],nodes:[{text:"子节点 1",tags:["3"],nodes:[{text:"孙子节点 1",tags:["6"]},{text:"孙子节点 2",tags:["3"]}]},{text:"子节点 2",tags:["3"]}]},{text:"父节点 2",tags:["7"]},{text:"父节点 3",icon:"glyphicon glyphicon-earphone",href:"#demo",tags:["11"]},{text:"父节点 4",icon:"glyphicon glyphicon-cloud-download",href:"/demo.html",tags:["19"],selected:!0},{text:"父节点 5",icon:"glyphicon glyphicon-certificate",color:"pink",backColor:"red",href:"http://www.tesco.com",tags:["available","0"]}],t='[{"text": "父节点 1","nodes": [{"text": "子节点 1","nodes": [{"text": "孙子节点 1"},{"text": "孙子节点 2"}]},{"text": "子节点 2"}]},{"text": "父节点 2"},{"text": "父节点 3"},{"text": "父节点 4"},{"text": "父节点 5"}]';$("#treeview1").treeview({data:e}),$("#treeview2").treeview({levels:1,data:e}),$("#treeview3").treeview({levels:99,data:e}),$("#treeview4").treeview({color:"#428bca",data:e}),$("#treeview5").treeview({color:"#428bca",expandIcon:"glyphicon glyphicon-chevron-right",collapseIcon:"glyphicon glyphicon-chevron-down",nodeIcon:"glyphicon glyphicon-bookmark",data:e}),$("#treeview6").treeview({color:"#428bca",expandIcon:"glyphicon glyphicon-stop",collapseIcon:"glyphicon glyphicon-unchecked",nodeIcon:"glyphicon glyphicon-user",showTags:!0,data:e}),$("#treeview7").treeview({color:"#428bca",showBorder:!1,data:e}),$("#treeview8").treeview({expandIcon:"glyphicon glyphicon-stop",collapseIcon:"glyphicon glyphicon-unchecked",nodeIcon:"glyphicon glyphicon-user",color:"yellow",backColor:"purple",onhoverColor:"orange",borderColor:"red",showBorder:!1,showTags:!0,highlightSelected:!0,selectedColor:"yellow",selectedBackColor:"darkorange",data:e}),$("#treeview9").treeview({expandIcon:"glyphicon glyphicon-stop",collapseIcon:"glyphicon glyphicon-unchecked",nodeIcon:"glyphicon glyphicon-user",color:"yellow",backColor:"purple",onhoverColor:"orange",borderColor:"red",showBorder:!1,showTags:!0,highlightSelected:!0,selectedColor:"yellow",selectedBackColor:"darkorange",data:o}),$("#treeview10").treeview({color:"#428bca",enableLinks:!0,data:e}),$("#treeview11").treeview({color:"#428bca",data:e,onNodeSelected:function(e,o){$("#event_output").prepend("

您单击了 "+o.text+"

")}}),$("#treeview12").treeview({data:t})}); 2 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/markdown/bootstrap-markdown.min.css: -------------------------------------------------------------------------------- 1 | .md-editor{display:block;border:1px solid #ddd}.md-editor .md-footer,.md-editor>.md-header{display:block;padding:6px 4px;background:#f5f5f5}.md-editor>.md-header{margin:0}.md-editor>.md-preview{background:#fff;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd;min-height:10px;overflow:auto}.md-editor>textarea{font-family:Menlo, Monaco, Consolas, "Courier New", monospace;font-size:14px;outline:0;margin:0;display:block;padding:15px;width:100%;border:0;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd;border-radius:0;box-shadow:none;background:#fafafa}.md-editor>textarea:focus{box-shadow:none;background:#fff}.md-editor.active{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)}.md-editor .md-controls{float:right;padding:3px}.md-editor .md-controls .md-control{right:5px;color:#bebebe;padding:3px 3px 3px 10px}.md-editor .md-controls .md-control:hover{color:#333}.md-editor.md-fullscreen-mode{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999;padding:60px 30px 15px;background:#fff!important;border:0!important}.md-editor.md-fullscreen-mode .md-footer{display:none}.md-editor.md-fullscreen-mode .md-input,.md-editor.md-fullscreen-mode .md-preview{margin:0 auto!important;height:100%!important;font-size:20px!important;padding:20px!important;color:#999;line-height:1.6em!important;resize:none!important;box-shadow:none!important;background:#fff!important;border:0!important}.md-editor.md-fullscreen-mode .md-preview{color:#333;overflow:auto}.md-editor.md-fullscreen-mode .md-input:focus,.md-editor.md-fullscreen-mode .md-input:hover{color:#333;background:#fff!important}.md-editor.md-fullscreen-mode .md-header{background:0 0;text-align:center;position:fixed;width:100%;top:20px}.md-editor.md-fullscreen-mode .btn-group{float:none}.md-editor.md-fullscreen-mode .btn{border:0;background:0 0;color:#b3b3b3}.md-editor.md-fullscreen-mode .btn.active,.md-editor.md-fullscreen-mode .btn:active,.md-editor.md-fullscreen-mode .btn:focus,.md-editor.md-fullscreen-mode .btn:hover{box-shadow:none;color:#333}.md-editor.md-fullscreen-mode .md-fullscreen-controls{position:absolute;top:20px;right:20px;text-align:right;z-index:1002;display:block}.md-editor.md-fullscreen-mode .md-fullscreen-controls a{color:#b3b3b3;clear:right;margin:10px;width:30px;height:30px;text-align:center}.md-editor.md-fullscreen-mode .md-fullscreen-controls a:hover{color:#333;text-decoration:none}.md-editor.md-fullscreen-mode .md-editor{height:100%!important;position:relative}.md-editor .md-fullscreen-controls{display:none}.md-nooverflow{overflow:hidden;position:fixed;width:100%} 2 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/flot/jquery.flot.resize.js: -------------------------------------------------------------------------------- 1 | /* Flot plugin for automatically redrawing plots as the placeholder resizes. 2 | 3 | Copyright (c) 2007-2013 IOLA and Ole Laursen. 4 | Licensed under the MIT license. 5 | 6 | It works by listening for changes on the placeholder div (through the jQuery 7 | resize event plugin) - if the size changes, it will redraw the plot. 8 | 9 | There are no options. If you need to disable the plugin for some plots, you 10 | can just fix the size of their placeholders. 11 | 12 | */ 13 | 14 | /* Inline dependency: 15 | * jQuery resize event - v1.1 - 3/14/2010 16 | * http://benalman.com/projects/jquery-resize-plugin/ 17 | * 18 | * Copyright (c) 2010 "Cowboy" Ben Alman 19 | * Dual licensed under the MIT and GPL licenses. 20 | * http://benalman.com/about/license/ 21 | */ 22 | 23 | (function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this); 24 | 25 | (function ($) { 26 | var options = { }; // no options 27 | 28 | function init(plot) { 29 | function onResize() { 30 | var placeholder = plot.getPlaceholder(); 31 | 32 | // somebody might have hidden us and we can't plot 33 | // when we don't have the dimensions 34 | if (placeholder.width() == 0 || placeholder.height() == 0) 35 | return; 36 | 37 | plot.resize(); 38 | plot.setupGrid(); 39 | plot.draw(); 40 | } 41 | 42 | function bindEvents(plot, eventHolder) { 43 | plot.getPlaceholder().resize(onResize); 44 | } 45 | 46 | function shutdown(plot, eventHolder) { 47 | plot.getPlaceholder().unbind("resize", onResize); 48 | } 49 | 50 | plot.hooks.bindEvents.push(bindEvents); 51 | plot.hooks.shutdown.push(shutdown); 52 | } 53 | 54 | $.plot.plugins.push({ 55 | init: init, 56 | options: options, 57 | name: 'resize', 58 | version: '1.0' 59 | }); 60 | })(jQuery); 61 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/summernote/summernote-zh-CN.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | $.extend($.summernote.lang, { 3 | 'zh-CN': { 4 | font: { 5 | bold: '粗体', 6 | italic: '斜体', 7 | underline: '下划线', 8 | strikethrough: '删除线', 9 | clear: '清除格式', 10 | height: '行高', 11 | name: '字体', 12 | size: '字号' 13 | }, 14 | image: { 15 | image: '图片', 16 | insert: '插入图片', 17 | resizeFull: '调整至 100%', 18 | resizeHalf: '调整至 50%', 19 | resizeQuarter: '调整至 25%', 20 | floatLeft: '左浮动', 21 | floatRight: '右浮动', 22 | floatNone: '不浮动', 23 | dragImageHere: '将图片拖至此处', 24 | selectFromFiles: '从本地上传', 25 | url: '图片地址' 26 | }, 27 | link: { 28 | link: '链接', 29 | insert: '插入链接', 30 | unlink: '去除链接', 31 | edit: '编辑链接', 32 | textToDisplay: '显示文本', 33 | url: '链接地址', 34 | openInNewWindow: '在新窗口打开' 35 | }, 36 | video: { 37 | video: '视频', 38 | videoLink: '视频链接', 39 | insert: '插入视频', 40 | url: '视频地址', 41 | providers: '(优酷, Instagram, DailyMotion, Youtube等)' 42 | }, 43 | table: { 44 | table: '表格' 45 | }, 46 | hr: { 47 | insert: '水平线' 48 | }, 49 | style: { 50 | style: '样式', 51 | normal: '普通', 52 | blockquote: '引用', 53 | pre: '代码', 54 | h1: '标题 1', 55 | h2: '标题 2', 56 | h3: '标题 3', 57 | h4: '标题 4', 58 | h5: '标题 5', 59 | h6: '标题 6' 60 | }, 61 | lists: { 62 | unordered: '无序列表', 63 | ordered: '有序列表' 64 | }, 65 | options: { 66 | help: '帮助', 67 | fullscreen: '全屏', 68 | codeview: '源代码' 69 | }, 70 | paragraph: { 71 | paragraph: '段落', 72 | outdent: '减少缩进', 73 | indent: '增加缩进', 74 | left: '左对齐', 75 | center: '居中对齐', 76 | right: '右对齐', 77 | justify: '两端对齐' 78 | }, 79 | color: { 80 | recent: '最近使用', 81 | more: '更多', 82 | background: '背景', 83 | foreground: '前景', 84 | transparent: '透明', 85 | setTransparent: '透明', 86 | reset: '重置', 87 | resetToDefault: '默认' 88 | }, 89 | shortcut: { 90 | shortcuts: '快捷键', 91 | close: '关闭', 92 | textFormatting: '文本格式', 93 | action: '动作', 94 | paragraphFormatting: '段落格式', 95 | documentStyle: '文档样式' 96 | }, 97 | history: { 98 | undo: '撤销', 99 | redo: '重做' 100 | } 101 | } 102 | }); 103 | })(jQuery); -------------------------------------------------------------------------------- /resources/assets/js/plugins/flot/jquery.flot.symbol.js: -------------------------------------------------------------------------------- 1 | /* Flot plugin that adds some extra symbols for plotting points. 2 | 3 | Copyright (c) 2007-2014 IOLA and Ole Laursen. 4 | Licensed under the MIT license. 5 | 6 | The symbols are accessed as strings through the standard symbol options: 7 | 8 | series: { 9 | points: { 10 | symbol: "square" // or "diamond", "triangle", "cross" 11 | } 12 | } 13 | 14 | */ 15 | 16 | (function ($) { 17 | function processRawData(plot, series, datapoints) { 18 | // we normalize the area of each symbol so it is approximately the 19 | // same as a circle of the given radius 20 | 21 | var handlers = { 22 | square: function (ctx, x, y, radius, shadow) { 23 | // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 24 | var size = radius * Math.sqrt(Math.PI) / 2; 25 | ctx.rect(x - size, y - size, size + size, size + size); 26 | }, 27 | diamond: function (ctx, x, y, radius, shadow) { 28 | // pi * r^2 = 2s^2 => s = r * sqrt(pi/2) 29 | var size = radius * Math.sqrt(Math.PI / 2); 30 | ctx.moveTo(x - size, y); 31 | ctx.lineTo(x, y - size); 32 | ctx.lineTo(x + size, y); 33 | ctx.lineTo(x, y + size); 34 | ctx.lineTo(x - size, y); 35 | }, 36 | triangle: function (ctx, x, y, radius, shadow) { 37 | // pi * r^2 = 1/2 * s^2 * sin (pi / 3) => s = r * sqrt(2 * pi / sin(pi / 3)) 38 | var size = radius * Math.sqrt(2 * Math.PI / Math.sin(Math.PI / 3)); 39 | var height = size * Math.sin(Math.PI / 3); 40 | ctx.moveTo(x - size/2, y + height/2); 41 | ctx.lineTo(x + size/2, y + height/2); 42 | if (!shadow) { 43 | ctx.lineTo(x, y - height/2); 44 | ctx.lineTo(x - size/2, y + height/2); 45 | } 46 | }, 47 | cross: function (ctx, x, y, radius, shadow) { 48 | // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 49 | var size = radius * Math.sqrt(Math.PI) / 2; 50 | ctx.moveTo(x - size, y - size); 51 | ctx.lineTo(x + size, y + size); 52 | ctx.moveTo(x - size, y + size); 53 | ctx.lineTo(x + size, y - size); 54 | } 55 | }; 56 | 57 | var s = series.points.symbol; 58 | if (handlers[s]) 59 | series.points.symbol = handlers[s]; 60 | } 61 | 62 | function init(plot) { 63 | plot.hooks.processDatapoints.push(processRawData); 64 | } 65 | 66 | $.plot.plugins.push({ 67 | init: init, 68 | name: 'symbols', 69 | version: '1.0' 70 | }); 71 | })(jQuery); 72 | -------------------------------------------------------------------------------- /resources/views/auth/log.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @section('content') 5 |
6 |
7 |
8 |
9 |
日志列表
10 |
11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach($list as $k => $v) 27 | 28 | 29 | 36 | 37 | 44 | 47 | 48 | 49 | 50 | @endforeach 51 | 52 |
ID用户method菜单地址参数创建时间修改时间
{{ $v['id'] }} 30 | @if(!empty($v->user->name)) 31 | {{ $v->user->name??'-'}}【{{$v->user_id}}】 32 | @else 33 | - 34 | @endif 35 | {{ $v['method'] }} 38 | @if(!empty($v['uri'])) 39 | {{ $v['uri'] }} 40 | @else 41 | - 42 | @endif 43 | 45 |
{{$v['params']?json_encode($v['params'], JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT):'-'}}
46 |
{{ $v['created_at'] }}{{ $v['updated_at'] }}
53 |
54 | @if(count($list) > 0) 55 | {{$list->links()}} 56 | @endif 57 | 58 |
59 |
60 |
61 |
62 | @endsection 63 | 64 | @push('scripts') 65 | 70 | @endpush -------------------------------------------------------------------------------- /resources/assets/js/plugins/layer/skin/layer.ext.css: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @Name: layer拓展样式 4 | @Date: 2012.12.13 5 | @Author: 贤心 6 | @blog: sentsin.com 7 | 8 | */.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span{text-overflow:ellipsis;white-space:nowrap}.layui-layer-iconext{background:url(default/icon-ext.png) no-repeat}html #layui_layer_skinlayerextcss{display:none;position:absolute;width:1989px}.layui-layer-prompt .layui-layer-input{display:block;width:220px;height:30px;margin:0 auto;line-height:30px;padding:0 5px;border:1px solid #ccc;box-shadow:1px 1px 5px rgba(0,0,0,.1) inset;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;border-bottom:1px solid #ccc;background-color:#eee;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;cursor:default;overflow:hidden}.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block}.xubox_tabclose{position:absolute;right:10px;top:5px;cursor:pointer}.layui-layer-photos{-webkit-animation-duration:1s;animation-duration:1s;background:url(default/xubox_loading1.gif) center center no-repeat #000}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal} 9 | -------------------------------------------------------------------------------- /resources/views/role/create.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @push('css') 5 | 6 | @endpush 7 | 8 | @section('content') 9 |
10 |
11 |
12 |
13 |
添加角色
14 | 15 |
16 | 19 |
20 | 21 |
22 |
23 |
24 |
25 | 26 |
27 | 28 |
29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 |
37 | 38 |
39 | @foreach($list as $v) 40 | 43 | @endforeach 44 |
45 |
46 |
47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | @endsection 58 | 59 | @push('scripts') 60 | 61 | 70 | @endpush 71 | -------------------------------------------------------------------------------- /resources/assets/js/demo/bootstrap-table-demo.min.js: -------------------------------------------------------------------------------- 1 | function cellStyle(e,t,o){var n=["active","success","info","warning","danger"];return o%2===0&&o/2t?1:t>e?-1:0}function nameFormatter(e){return e+' '}function starsFormatter(e){return' '+e}function queryParams(){return{type:"owner",sort:"updated",direction:"desc",per_page:100,page:1}}function buildTable(e,t,o){var n,l,s,a=[],c=[];for(n=0;t>n;n++)a.push({field:"字段"+n,title:"单元"+n});for(n=0;o>n;n++){for(s={},l=0;t>l;l++)s["字段"+l]="Row-"+n+"-"+l;c.push(s)}e.bootstrapTable("destroy").bootstrapTable({columns:a,data:c,iconSize:"outline",icons:{columns:"glyphicon-list"}})}!function(e,t,o){"use strict";!function(){var e=[{Tid:"1",First:"奔波儿灞",sex:"男",Score:"50"},{Tid:"2",First:"灞波儿奔",sex:"男",Score:"94"},{Tid:"3",First:"作家崔成浩",sex:"男",Score:"80"},{Tid:"4",First:"韩寒",sex:"男",Score:"67"},{Tid:"5",First:"郭敬明",sex:"男",Score:"100"},{Tid:"6",First:"马云",sex:"男",Score:"77"},{Tid:"7",First:"范爷",sex:"女",Score:"87"}];o("#exampleTableFromData").bootstrapTable({data:e,height:"250"})}(),function(){o("#exampleTableColumns").bootstrapTable({url:"js/demo/bootstrap_table_test.json",height:"400",iconSize:"outline",showColumns:!0,icons:{refresh:"glyphicon-repeat",toggle:"glyphicon-list-alt",columns:"glyphicon-list"}})}(),buildTable(o("#exampleTableLargeColumns"),50,50),function(){o("#exampleTableToolbar").bootstrapTable({url:"js/demo/bootstrap_table_test2.json",search:!0,showRefresh:!0,showToggle:!0,showColumns:!0,toolbar:"#exampleToolbar",iconSize:"outline",icons:{refresh:"glyphicon-repeat",toggle:"glyphicon-list-alt",columns:"glyphicon-list"}})}(),function(){o("#exampleTableEvents").bootstrapTable({url:"js/demo/bootstrap_table_test.json",search:!0,pagination:!0,showRefresh:!0,showToggle:!0,showColumns:!0,iconSize:"outline",toolbar:"#exampleTableEventsToolbar",icons:{refresh:"glyphicon-repeat",toggle:"glyphicon-list-alt",columns:"glyphicon-list"}});var e=o("#examplebtTableEventsResult");o("#exampleTableEvents").on("all.bs.table",function(e,t,o){console.log("Event:",t,", data:",o)}).on("click-row.bs.table",function(){e.text("Event: click-row.bs.table")}).on("dbl-click-row.bs.table",function(){e.text("Event: dbl-click-row.bs.table")}).on("sort.bs.table",function(){e.text("Event: sort.bs.table")}).on("check.bs.table",function(){e.text("Event: check.bs.table")}).on("uncheck.bs.table",function(){e.text("Event: uncheck.bs.table")}).on("check-all.bs.table",function(){e.text("Event: check-all.bs.table")}).on("uncheck-all.bs.table",function(){e.text("Event: uncheck-all.bs.table")}).on("load-success.bs.table",function(){e.text("Event: load-success.bs.table")}).on("load-error.bs.table",function(){e.text("Event: load-error.bs.table")}).on("column-switch.bs.table",function(){e.text("Event: column-switch.bs.table")}).on("page-change.bs.table",function(){e.text("Event: page-change.bs.table")}).on("search.bs.table",function(){e.text("Event: search.bs.table")})}()}(document,window,jQuery); 2 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ config("lazy-admin.name") }} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 25 | 26 | 27 | 28 |
29 |
30 |
31 |

{{ config("lazy-admin.logo") }}

32 |
33 |

登录

34 |
35 | 36 |
37 | 38 |
39 |
40 | 41 |
42 | 43 |
44 |
45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /resources/views/role/update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @push('css') 5 | 6 | @endpush 7 | @section('content') 8 |
9 |
10 |
11 |
12 |
修改角色
13 | 14 |
15 | 18 |
19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 |
27 | 28 |
29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 |
37 | 38 |
39 | @foreach($list as $v) 40 | 43 | @endforeach 44 |
45 |
46 |
47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | @endsection 58 | 59 | @push('scripts') 60 | 61 | 70 | @endpush -------------------------------------------------------------------------------- /resources/assets/js/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.7.1 2 | 3 | /* 4 | @preserve jQuery.PrettyTextDiff 1.0.4 5 | See https://github.com/arnab/jQuery.PrettyTextDiff/ 6 | */ 7 | 8 | (function() { 9 | var $; 10 | 11 | $ = jQuery; 12 | 13 | $.fn.extend({ 14 | prettyTextDiff: function(options) { 15 | var dmp, settings; 16 | settings = { 17 | originalContainer: ".original", 18 | changedContainer: ".changed", 19 | diffContainer: ".diff", 20 | cleanup: true, 21 | debug: false 22 | }; 23 | settings = $.extend(settings, options); 24 | $.fn.prettyTextDiff.debug("Options: ", settings, settings); 25 | dmp = new diff_match_patch(); 26 | return this.each(function() { 27 | var changed, diff_as_html, diffs, original; 28 | if (settings.originalContent && settings.changedContent) { 29 | original = $('
').html(settings.originalContent).text(); 30 | changed = $('
').html(settings.changedContent).text(); 31 | } else { 32 | original = $(settings.originalContainer, this).text(); 33 | changed = $(settings.changedContainer, this).text(); 34 | } 35 | $.fn.prettyTextDiff.debug("Original text found: ", original, settings); 36 | $.fn.prettyTextDiff.debug("Changed text found: ", changed, settings); 37 | diffs = dmp.diff_main(original, changed); 38 | if (settings.cleanup) { 39 | dmp.diff_cleanupSemantic(diffs); 40 | } 41 | $.fn.prettyTextDiff.debug("Diffs: ", diffs, settings); 42 | diff_as_html = $.map(diffs, function(diff) { 43 | return $.fn.prettyTextDiff.createHTML(diff); 44 | }); 45 | $(settings.diffContainer, this).html(diff_as_html.join('')); 46 | return this; 47 | }); 48 | } 49 | }); 50 | 51 | $.fn.prettyTextDiff.debug = function(message, object, settings) { 52 | if (settings.debug) { 53 | return console.log(message, object); 54 | } 55 | }; 56 | 57 | $.fn.prettyTextDiff.createHTML = function(diff) { 58 | var data, html, operation, pattern_amp, pattern_gt, pattern_lt, pattern_para, text; 59 | html = []; 60 | pattern_amp = /&/g; 61 | pattern_lt = //g; 63 | pattern_para = /\n/g; 64 | operation = diff[0], data = diff[1]; 65 | text = data.replace(pattern_amp, '&').replace(pattern_lt, '<').replace(pattern_gt, '>').replace(pattern_para, '
'); 66 | switch (operation) { 67 | case DIFF_INSERT: 68 | return '' + text + ''; 69 | case DIFF_DELETE: 70 | return '' + text + ''; 71 | case DIFF_EQUAL: 72 | return '' + text + ''; 73 | } 74 | }; 75 | 76 | }).call(this); 77 | -------------------------------------------------------------------------------- /src/Controllers/AuthController.php: -------------------------------------------------------------------------------- 1 | session()->put($this->redirectToSessionKey, URL::previous()); 29 | } 30 | return view('lazy-view::auth.login'); 31 | } 32 | 33 | /** 34 | * 处理认证尝试 35 | * 36 | * @param \Illuminate\Http\Request $request 37 | * 38 | * @return Response 39 | */ 40 | public function loginDo(Request $request) 41 | { 42 | $credentials = $request->only('account', 'password', 'referer'); 43 | $validator = Validator::make($credentials, [ 44 | 'account' => 'required', 45 | 'password' => 'required', 46 | ], [ 47 | 'account.required' => '名称/邮箱不能为空.', 48 | 'password.required' => '密码不能为空.' 49 | ]); 50 | if ($validator->fails()) { 51 | $errors = $validator->errors(); 52 | return ajaxReturn(0, $errors->first()); 53 | } 54 | $guardName = Guard::ADMIN_GUARD; 55 | $where = [ 56 | ['name', '=', $credentials['account']], 57 | ['guard_name', '=', $guardName] 58 | ]; 59 | $orWhere = [ 60 | ['email', '=', $credentials['account']], 61 | ['guard_name', '=', $guardName] 62 | ]; 63 | $adminUser = AdminUser::where($where)->orWhere($orWhere)->first(); 64 | if (empty($adminUser)) { 65 | return ajaxReturn(0, '账号密码错误,请重试.'); 66 | } 67 | $checkPass = Hash::check($credentials['password'], $adminUser->getAuthPassword()); 68 | if (!$checkPass) { 69 | return ajaxReturn(0, '账号密码错误,请重试.'); 70 | } 71 | // 登录用户 72 | Auth::guard($guardName)->login($adminUser); 73 | // 跳回判断 74 | $url = route('lazy-admin.home'); 75 | $redirectTo = $request->session()->get($this->redirectToSessionKey); 76 | if (!empty($redirectTo)) { 77 | $url = $redirectTo; 78 | $request->session()->forget($this->redirectToSessionKey); 79 | } 80 | return ajaxReturn(1, '成功', ['url'=>$url]); 81 | } 82 | 83 | /** 84 | * 退出登录 85 | * 86 | * @param Request $request 87 | * @return void 88 | */ 89 | public function logout(Request $request) 90 | { 91 | try { 92 | $guardName = Guard::ADMIN_GUARD; 93 | Auth::guard($guardName)->logout(); 94 | return ajaxReturn(1, '退出成功', ['url'=>route('lazy-admin.home')]); 95 | } catch (\Exception $e) { 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/layer/laydate/theme/default/font/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by iconfont 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/cropper/cropper.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Cropper v0.7.6-beta 3 | * https://github.com/fengyuanchen/cropper 4 | * 5 | * Copyright 2014 Fengyuan Chen 6 | * Released under the MIT license 7 | */ 8 | 9 | .cropper-container{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.cropper-container img{width:100%;height:100%;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important}.cropper-modal,.cropper-canvas{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-canvas{background-color:#fff;opacity:0;filter:alpha(opacity=0)}.cropper-modal{background-color:#000;opacity:.5;filter:alpha(opacity=50)}.cropper-dragger{position:absolute;top:10%;left:10%;width:80%;height:80%}.cropper-viewer{display:block;width:100%;height:100%;overflow:hidden;outline-width:1px;outline-style:solid;outline-color:#69f;outline-color:rgba(51,102,255,.75)}.cropper-dashed{position:absolute;display:block;border:0 dashed #fff;opacity:.5;filter:alpha(opacity=50)}.cropper-dashed.dashed-h{top:33.3%;left:0;width:100%;height:33.3%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.3%;width:33.3%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;opacity:.1;filter:alpha(opacity=10)}.cropper-face{top:0;left:0;cursor:move;background-color:#fff}.cropper-line{background-color:#69f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;background-color:#69f;opacity:.75;filter:alpha(opacity=75)}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;opacity:1;filter:alpha(opacity=100)}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";background-color:#69f;opacity:0;filter:alpha(opacity=0)}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;opacity:.75;filter:alpha(opacity=75)}}.cropper-hidden{display:none!important}.cropper-invisible{position:fixed;top:0;left:0;z-index:-1;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;opacity:0;filter:alpha(opacity=0)}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-canvas,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed} 10 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/gritter/jquery.gritter.css: -------------------------------------------------------------------------------- 1 | /* the norm */ 2 | #gritter-notice-wrapper { 3 | position:fixed; 4 | top:40px; 5 | right:20px; 6 | width:301px; 7 | z-index:9999; 8 | 9 | -webkit-animation-duration: 1s; 10 | animation-duration: 1s; 11 | -webkit-animation-fill-mode: both; 12 | animation-fill-mode: both; 13 | 14 | -webkit-animation-name: bounceIn; 15 | animation-name: bounceIn; 16 | } 17 | @keyframes bounceIn { 18 | 0% { 19 | opacity: 0; 20 | -webkit-transform: scale(.3); 21 | -ms-transform: scale(.3); 22 | transform: scale(.3); 23 | } 24 | 25 | 50% { 26 | opacity: 1; 27 | -webkit-transform: scale(1.05); 28 | -ms-transform: scale(1.05); 29 | transform: scale(1.05); 30 | } 31 | 32 | 70% { 33 | -webkit-transform: scale(.9); 34 | -ms-transform: scale(.9); 35 | transform: scale(.9); 36 | } 37 | 38 | 100% { 39 | opacity: 1; 40 | -webkit-transform: scale(1); 41 | -ms-transform: scale(1); 42 | transform: scale(1); 43 | } 44 | } 45 | #gritter-notice-wrapper.top-left { 46 | left: 20px; 47 | right: auto; 48 | } 49 | #gritter-notice-wrapper.bottom-right { 50 | top: auto; 51 | left: auto; 52 | bottom: 20px; 53 | right: 20px; 54 | } 55 | #gritter-notice-wrapper.bottom-left { 56 | top: auto; 57 | right: auto; 58 | bottom: 20px; 59 | left: 20px; 60 | } 61 | .gritter-item-wrapper { 62 | position:relative; 63 | margin:0 0 10px 0; 64 | background:url('images/ie-spacer.gif'); /* ie7/8 fix */ 65 | } 66 | 67 | .hover .gritter-top { 68 | /*background-position:right -30px;*/ 69 | } 70 | .gritter-bottom { 71 | height:8px; 72 | margin:0; 73 | } 74 | 75 | .gritter-item { 76 | display:block; 77 | background-color: rgba(39,58,75,0.8); 78 | border-radius: 4px; 79 | color:#eee; 80 | padding:10px 11px 10px 11px; 81 | font-size: 11px; 82 | font-family:verdana; 83 | } 84 | .hover .gritter-item { 85 | background-position:right -40px; 86 | } 87 | .gritter-item p { 88 | padding:0; 89 | margin:0; 90 | word-wrap:break-word; 91 | } 92 | 93 | .gritter-item a:hover { 94 | color: #f8ac59; 95 | text-decoration: underline; 96 | } 97 | .gritter-close { 98 | display:none; 99 | position:absolute; 100 | top:5px; 101 | right:3px; 102 | background:url(images/gritter.png) no-repeat left top; 103 | cursor:pointer; 104 | width:30px; 105 | height:30px; 106 | text-indent:-9999em; 107 | } 108 | .gritter-title { 109 | font-size:12px; 110 | font-weight:bold; 111 | padding:0 0 7px 0; 112 | display:block; 113 | text-transform: uppercase; 114 | } 115 | .gritter-image { 116 | width:48px; 117 | height:48px; 118 | float:left; 119 | } 120 | .gritter-with-image, 121 | .gritter-without-image { 122 | padding:0; 123 | } 124 | .gritter-with-image { 125 | width:220px; 126 | float:right; 127 | } 128 | /* for the light (white) version of the gritter notice */ 129 | .gritter-light .gritter-item, 130 | .gritter-light .gritter-bottom, 131 | .gritter-light .gritter-top, 132 | .gritter-light .gritter-close { 133 | background-image: url(images/gritter-light.png); 134 | color: #222; 135 | } 136 | .gritter-light .gritter-title { 137 | text-shadow: none; 138 | } 139 | -------------------------------------------------------------------------------- /resources/views/permission/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @section('content') 5 |
6 |
7 |
8 |
9 |
权限管理
10 |
11 |
12 |
13 | @lazy_can('admin-permission-create') 14 |
15 | 16 |
17 | @end_lazy_can 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | @foreach($list as $k => $v) 33 | 34 | 35 | 36 | 37 | 38 | 39 | 51 | 52 | @endforeach 53 | 54 |
ID名称标识创建时间修改时间操作
{{ $v->id }}{{ $v->title }}{{ $v->name }}{{ $v->created_at }}{{ $v->updated_at }} 40 | @lazy_can('admin-permission-update') 41 | 42 |  修改 43 | 44 | @end_lazy_can 45 | @lazy_can('admin-permission-delete') 46 | 47 |  删除 48 | 49 | @end_lazy_can 50 |
55 |
56 | {{ $list->appends(request()->except('s'))->links() }} 57 |
58 |
59 | 60 |
61 |
62 |
63 |
64 | @endsection 65 | 66 | @push('scripts') 67 | 72 | @endpush -------------------------------------------------------------------------------- /resources/views/layout_window.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{config('lazy-admin.name')}} 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | @stack('css') 21 | 33 | 34 | 35 |
36 | @yield('content') 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | @stack('scripts') 51 | 52 | 53 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/peity/jquery.peity.min.js: -------------------------------------------------------------------------------- 1 | // Peity jQuery plugin version 2.0.3 2 | // (c) 2014 Ben Pickles 3 | // 4 | // http://benpickles.github.io/peity 5 | // 6 | // Released under MIT license. 7 | (function(e,q,h){var o=function(a,b){var c=q.createElementNS("http://www.w3.org/2000/svg",a);e.each(b,function(a,b){c.setAttribute(a,b)});return c},t="createElementNS"in q&&o("svg",{}).createSVGRect,r=1/(window.devicePixelRatio||1),j=e.fn.peity=function(a,b){t&&this.each(function(){var c=e(this),d=c.data("peity");if(d)a&&(d.type=a),e.extend(d.opts,b);else{var f=j.defaults[a],g={};e.each(c.data(),function(a,b){a in f&&(g[a]=b)});var h=e.extend({},f,g,b),d=new s(c,a,h);c.change(function(){d.draw()}).data("peity", 8 | d)}d.draw()});return this},s=function(a,b,c){this.$el=a;this.type=b;this.opts=c},m=s.prototype;m.draw=function(){j.graphers[this.type].call(this,this.opts)};m.fill=function(){var a=this.opts.fill,b=a;e.isFunction(b)||(b=function(b,d){return a[d%a.length]});return b};m.prepare=function(a,b){var c;this.svg?c=e(this.svg).empty():(this.svg=o("svg",{"class":"peity"}),this.$el.hide().after(this.svg),c=e(this.svg).data("peity",this));this.svg.setAttribute("height",b);this.svg.setAttribute("width",a);return c}; 9 | m.values=function(){return e.map(this.$el.text().split(this.opts.delimiter),function(a){return parseFloat(a)})};j.defaults={};j.graphers={};j.register=function(a,b,c){this.defaults[a]=b;this.graphers[a]=c};j.register("pie",{delimiter:null,diameter:16,fill:["#ff9900","#fff4dd","#ffc66e"]},function(a){if(!a.delimiter){var b=this.$el.text().match(/[^0-9\.]/);a.delimiter=b?b[0]:","}b=this.values();if("/"==a.delimiter)var c=b[0],b=[c,h.max(0,b[1]-c)];for(var d=0,c=b.length,f=0;de?1:0,1,q,r,"Z"].join(" ")});i=l}k.setAttribute("fill",j.call(this,n,d,b));this.svg.appendChild(k)}}});j.register("line",{delimiter:",",fill:"#c6d9fd",height:16,max:null, 11 | min:0,stroke:"#4d89f9",strokeWidth:1,width:32},function(a){var b=this.values();1==b.length&&b.push(b[0]);for(var c=h.max.apply(h,b.concat([a.max])),d=h.min.apply(h,b.concat([a.min])),f=this.prepare(a.width,a.height),g=f.width(),f=f.height()-a.strokeWidth,e=g/(b.length-1),c=c-d,j=0==c?f:f/c,m=f+d*j,c=[0,m],i=0;i=d&&0k&&(l+=k,k=-k);n=o("rect",{fill:m.call(this,n,i,b),x:i*g,y:l,width:g-a,height:k});this.svg.appendChild(n)}})})(jQuery,document,Math); 14 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/colorpicker/css/bootstrap-colorpicker.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Colorpicker 3 | * http://mjolnic.github.io/bootstrap-colorpicker/ 4 | * 5 | * Originally written by (c) 2012 Stefan Petre 6 | * Licensed under the Apache License v2.0 7 | * http://www.apache.org/licenses/LICENSE-2.0.txt 8 | * 9 | */.colorpicker-saturation{float:left;width:100px;height:100px;cursor:crosshair;background-image:url("../img/bootstrap-colorpicker/saturation.png")}.colorpicker-saturation i{position:absolute;top:0;left:0;display:block;width:5px;height:5px;margin:-4px 0 0 -4px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-saturation i b{display:block;width:5px;height:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-hue,.colorpicker-alpha{float:left;width:15px;height:100px;margin-bottom:4px;margin-left:4px;cursor:row-resize}.colorpicker-hue i,.colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:100%;height:1px;margin-top:-1px;background:#000;border-top:1px solid #fff}.colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue.png")}.colorpicker-alpha{display:none;background-image:url("../img/bootstrap-colorpicker/alpha.png")}.colorpicker{top:0;left:0;z-index:25000!important;min-width:130px;padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1}.colorpicker:before,.colorpicker:after{display:table;line-height:0;content:""}.colorpicker:after{clear:both}.colorpicker:before{position:absolute;top:-7px;left:6px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.colorpicker:after{position:absolute;top:-6px;left:7px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url("../img/bootstrap-colorpicker/alpha.png");background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-element .input-group-addon i,.colorpicker-element .add-on i{display:inline-block;width:16px;height:16px;vertical-align:text-top;cursor:pointer}.colorpicker.colorpicker-inline{position:relative;z-index:auto;display:inline-block;float:none}.colorpicker.colorpicker-horizontal{width:110px;height:auto;min-width:110px}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-hue,.colorpicker.colorpicker-horizontal .colorpicker-alpha{float:left;width:100px;height:15px;margin-bottom:4px;margin-left:0;cursor:col-resize}.colorpicker.colorpicker-horizontal .colorpicker-hue i,.colorpicker.colorpicker-horizontal .colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:1px;height:15px;margin-top:0;background:#fff;border:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue-horizontal.png")}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url("../img/bootstrap-colorpicker/alpha-horizontal.png")}.colorpicker.colorpicker-hidden{display:none}.colorpicker.colorpicker-visible{display:block}.colorpicker-inline.colorpicker-visible{display:inline-block} 10 | -------------------------------------------------------------------------------- /resources/views/role/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @section('content') 5 |
6 |
7 |
8 |
9 |
角色管理
10 |
11 |
12 |
13 | @lazy_can('admin-role-create') 14 |
15 | 16 |
17 | @end_lazy_can 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | @foreach($list as $k => $v) 33 | 34 | 35 | 36 | 37 | 38 | 39 | 62 | 63 | @endforeach 64 | 65 |
ID名称标识创建时间修改时间操作
{{ $v->id }}{{ $v->title }}{{ $v->name }}{{ $v->created_at }}{{ $v->updated_at }} 40 | @lazy_can('admin-role-update') 41 | 42 | 修改角色 43 | 44 |
45 | @end_lazy_can 46 | 47 | @lazy_can('admin-role-menu') 48 | 49 | 角色菜单 50 | 51 |
52 | @end_lazy_can 53 | 54 | @if($v->id !=1 ) 55 | @lazy_can('admin-role-delete') 56 | 57 | 删除角色 58 | 59 | @end_lazy_can 60 | @endif 61 |
66 |
67 | {{ $list->appends(request()->except('s'))->links() }} 68 |
69 |
70 |
71 |
72 |
73 |
74 | @endsection 75 | 76 | @push('scripts') 77 | 82 | @endpush 83 | -------------------------------------------------------------------------------- /resources/assets/js/demo/form-advanced-demo.min.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){function e(){var e=$("body")[0].style;$("#demo_apidemo").colorpicker({color:e.backgroundColor}).on("changeColor",function(o){e.backgroundColor=o.color.toHex()}),$("#demo_forceformat").colorpicker({format:"rgba",horizontal:!0}),$(".demo-auto").colorpicker(),$(".disable-button").click(function(e){e.preventDefault(),$("#demo_endis").colorpicker("disable")}),$(".enable-button").click(function(e){e.preventDefault(),$("#demo_endis").colorpicker("enable")})}var o=$(".image-crop > img");$(o).cropper({aspectRatio:1.618,preview:".img-preview",done:function(){}});var r=$("#inputImage");window.FileReader?r.change(function(){var e,i=new FileReader,t=this.files;t.length&&(e=t[0],/^image\/\w+$/.test(e.type)?(i.readAsDataURL(e),i.onload=function(){r.val(""),o.cropper("reset",!0).cropper("replace",this.result)}):showMessage("请选择图片文件"))}):r.addClass("hide"),$("#download").click(function(){window.open(o.cropper("getDataURL"))}),$("#zoomIn").click(function(){o.cropper("zoom",.1)}),$("#zoomOut").click(function(){o.cropper("zoom",-.1)}),$("#rotateLeft").click(function(){o.cropper("rotate",45)}),$("#rotateRight").click(function(){o.cropper("rotate",-45)}),$("#setDrag").click(function(){o.cropper("setDragMode","crop")}),$("#data_1 .input-group.date").datepicker({todayBtn:"linked",keyboardNavigation:!1,forceParse:!1,calendarWeeks:!0,autoclose:!0}),$("#data_2 .input-group.date").datepicker({startView:1,todayBtn:"linked",keyboardNavigation:!1,forceParse:!1,autoclose:!0,format:"yyyy-mm-dd"}),$("#data_3 .input-group.date").datepicker({startView:2,todayBtn:"linked",keyboardNavigation:!1,forceParse:!1,autoclose:!0}),$("#data_4 .input-group.date").datepicker({minViewMode:1,keyboardNavigation:!1,forceParse:!1,autoclose:!0,todayHighlight:!0}),$("#data_5 .input-daterange").datepicker({keyboardNavigation:!1,forceParse:!1,autoclose:!0});{var i=document.querySelector(".js-switch"),t=(new Switchery(i,{color:"#1AB394"}),document.querySelector(".js-switch_2")),a=(new Switchery(t,{color:"#ED5565"}),document.querySelector(".js-switch_3"));new Switchery(a,{color:"#1AB394"})}$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green"}),$(".colorpicker-demo1").colorpicker(),$(".colorpicker-demo2").colorpicker(),$(".colorpicker-demo3").colorpicker(),e(),$(".demo-destroy").click(function(e){e.preventDefault(),$(".demo").colorpicker("destroy"),$(".disable-button, .enable-button").off("click")}),$(".demo-create").click(function(o){o.preventDefault(),e()});var c=$(".back-change")[0].style;$("#demo_apidemo").colorpicker({color:c.backgroundColor}).on("changeColor",function(e){c.backgroundColor=e.color.toHex()}),$(".clockpicker").clockpicker(),$('#file-pretty input[type="file"]').prettyFile()});var config={".chosen-select":{},".chosen-select-deselect":{allow_single_deselect:!0},".chosen-select-no-single":{disable_search_threshold:10},".chosen-select-no-results":{no_results_text:"Oops, nothing found!"},".chosen-select-width":{width:"95%"}};for(var selector in config)$(selector).chosen(config[selector]);$("#ionrange_1").ionRangeSlider({min:0,max:5e3,type:"double",prefix:"¥",maxPostfix:"+",prettify:!1,hasGrid:!0}),$("#ionrange_2").ionRangeSlider({min:0,max:10,type:"single",step:.1,postfix:" 克",prettify:!1,hasGrid:!0}),$("#ionrange_3").ionRangeSlider({min:-50,max:50,from:0,postfix:"°",prettify:!1,hasGrid:!0}),$("#ionrange_4").ionRangeSlider({values:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],type:"single",hasGrid:!0}),$("#ionrange_5").ionRangeSlider({min:1e4,max:1e5,step:100,postfix:" km",from:55e3,hideMinMax:!0,hideFromTo:!1}),$(".dial").knob(),$("#basic_slider").noUiSlider({start:40,behaviour:"tap",connect:"upper",range:{min:20,max:80}}),$("#range_slider").noUiSlider({start:[40,60],behaviour:"drag",connect:!0,range:{min:20,max:80}}),$("#drag-fixed").noUiSlider({start:[40,60],behaviour:"drag-fixed",connect:!0,range:{min:20,max:80}}); 2 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/ionRangeSlider/ion.rangeSlider.css: -------------------------------------------------------------------------------- 1 | /* Ion.RangeSlider 2 | // css version 1.8.5 3 | // by Denis Ineshin | ionden.com 4 | // ===================================================================================================================*/ 5 | 6 | /* ===================================================================================================================== 7 | // RangeSlider */ 8 | 9 | .irs { 10 | position: relative; display: block; 11 | } 12 | .irs-line { 13 | position: relative; display: block; 14 | overflow: hidden; 15 | } 16 | .irs-line-left, .irs-line-mid, .irs-line-right { 17 | position: absolute; display: block; 18 | top: 0; 19 | } 20 | .irs-line-left { 21 | left: 0; width: 10%; 22 | } 23 | .irs-line-mid { 24 | left: 10%; width: 80%; 25 | } 26 | .irs-line-right { 27 | right: 0; width: 10%; 28 | } 29 | 30 | .irs-diapason { 31 | position: absolute; display: block; 32 | left: 0; width: 100%; 33 | } 34 | .irs-slider { 35 | position: absolute; display: block; 36 | cursor: default; 37 | z-index: 1; 38 | } 39 | .irs-slider.single { 40 | left: 10px; 41 | } 42 | .irs-slider.single:before { 43 | position: absolute; display: block; content: ""; 44 | top: -30%; left: -30%; 45 | width: 160%; height: 160%; 46 | background: rgba(0,0,0,0.0); 47 | } 48 | .irs-slider.from { 49 | left: 100px; 50 | } 51 | .irs-slider.from:before { 52 | position: absolute; display: block; content: ""; 53 | top: -30%; left: -30%; 54 | width: 130%; height: 160%; 55 | background: rgba(0,0,0,0.0); 56 | } 57 | .irs-slider.to { 58 | left: 300px; 59 | } 60 | .irs-slider.to:before { 61 | position: absolute; display: block; content: ""; 62 | top: -30%; left: 0; 63 | width: 130%; height: 160%; 64 | background: rgba(0,0,0,0.0); 65 | } 66 | .irs-slider.last { 67 | z-index: 2; 68 | } 69 | 70 | .irs-min { 71 | position: absolute; display: block; 72 | left: 0; 73 | cursor: default; 74 | } 75 | .irs-max { 76 | position: absolute; display: block; 77 | right: 0; 78 | cursor: default; 79 | } 80 | 81 | .irs-from, .irs-to, .irs-single { 82 | position: absolute; display: block; 83 | top: 0; left: 0; 84 | cursor: default; 85 | white-space: nowrap; 86 | } 87 | 88 | 89 | .irs-grid { 90 | position: absolute; display: none; 91 | bottom: 0; left: 0; 92 | width: 100%; height: 20px; 93 | } 94 | .irs-with-grid .irs-grid { 95 | display: block; 96 | } 97 | .irs-grid-pol { 98 | position: absolute; 99 | top: 0; left: 0; 100 | width: 1px; height: 8px; 101 | background: #000; 102 | } 103 | .irs-grid-pol.small { 104 | height: 4px; 105 | } 106 | .irs-grid-text { 107 | position: absolute; 108 | bottom: 0; left: 0; 109 | width: 100px; 110 | white-space: nowrap; 111 | text-align: center; 112 | font-size: 9px; line-height: 9px; 113 | color: #000; 114 | } 115 | 116 | .irs-disable-mask { 117 | position: absolute; display: block; 118 | top: 0; left: 0; 119 | width: 100%; height: 100%; 120 | cursor: default; 121 | background: rgba(0,0,0,0.0); 122 | z-index: 2; 123 | } 124 | .irs-disabled { 125 | opacity: 0.4; 126 | } 127 | -------------------------------------------------------------------------------- /resources/views/user/create.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @push('css') 5 | 6 | @endpush 7 | 8 | @section('content') 9 |
10 |
11 |
12 |
13 |
添加管理员
14 | 15 |
16 | 19 |
20 | 21 |
22 |
23 |
24 |
25 | 26 |
27 | 名称不可重复 28 |
29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 |
37 | 38 |
39 | 邮箱用于登录 40 |
41 |
42 |
43 | 44 |
45 | 密码最少6位 46 |
47 |
48 | 49 |
50 | 51 |
52 | @foreach($list as $v) 53 | 56 | @endforeach 57 |
58 |
59 | 60 |
61 |
62 | 63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | @endsection 72 | 73 | @push('scripts') 74 | 75 | 84 | @endpush 85 | 86 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/nouslider/jquery.nouislider.css: -------------------------------------------------------------------------------- 1 | 2 | /* Functional styling; 3 | * These styles are required for noUiSlider to function. 4 | * You don't need to change these rules to apply your design. 5 | */ 6 | .noUi-target, 7 | .noUi-target * { 8 | -webkit-touch-callout: none; 9 | -webkit-user-select: none; 10 | -ms-touch-action: none; 11 | -ms-user-select: none; 12 | -moz-user-select: none; 13 | -moz-box-sizing: border-box; 14 | box-sizing: border-box; 15 | } 16 | .noUi-base { 17 | width: 100%; 18 | height: 100%; 19 | position: relative; 20 | } 21 | .noUi-origin { 22 | position: absolute; 23 | right: 0; 24 | top: 0; 25 | left: 0; 26 | bottom: 0; 27 | } 28 | .noUi-handle { 29 | position: relative; 30 | z-index: 1; 31 | } 32 | .noUi-stacking .noUi-handle { 33 | /* This class is applied to the lower origin when 34 | its values is > 50%. */ 35 | z-index: 10; 36 | } 37 | .noUi-stacking + .noUi-origin { 38 | /* Fix stacking order in IE7, which incorrectly 39 | creates a new context for the origins. */ 40 | *z-index: -1; 41 | } 42 | .noUi-state-tap .noUi-origin { 43 | -webkit-transition: left 0.3s, top 0.3s; 44 | transition: left 0.3s, top 0.3s; 45 | } 46 | .noUi-state-drag * { 47 | cursor: inherit !important; 48 | } 49 | 50 | /* Slider size and handle placement; 51 | */ 52 | .noUi-horizontal { 53 | height: 18px; 54 | } 55 | .noUi-horizontal .noUi-handle { 56 | width: 34px; 57 | height: 28px; 58 | left: -17px; 59 | top: -6px; 60 | } 61 | .noUi-horizontal.noUi-extended { 62 | padding: 0 15px; 63 | } 64 | .noUi-horizontal.noUi-extended .noUi-origin { 65 | right: -15px; 66 | } 67 | .noUi-vertical { 68 | width: 18px; 69 | } 70 | .noUi-vertical .noUi-handle { 71 | width: 28px; 72 | height: 34px; 73 | left: -6px; 74 | top: -17px; 75 | } 76 | .noUi-vertical.noUi-extended { 77 | padding: 15px 0; 78 | } 79 | .noUi-vertical.noUi-extended .noUi-origin { 80 | bottom: -15px; 81 | } 82 | 83 | /* Styling; 84 | */ 85 | .noUi-background { 86 | background: #FAFAFA; 87 | box-shadow: inset 0 1px 1px #f0f0f0; 88 | } 89 | .noUi-connect { 90 | background: #3FB8AF; 91 | box-shadow: inset 0 0 3px rgba(51,51,51,0.45); 92 | -webkit-transition: background 450ms; 93 | transition: background 450ms; 94 | } 95 | .noUi-origin { 96 | border-radius: 2px; 97 | } 98 | .noUi-target { 99 | border-radius: 4px; 100 | border: 1px solid #D3D3D3; 101 | box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB; 102 | } 103 | .noUi-target.noUi-connect { 104 | box-shadow: inset 0 0 3px rgba(51,51,51,0.45), 0 3px 6px -5px #BBB; 105 | } 106 | 107 | /* Handles and cursors; 108 | */ 109 | .noUi-dragable { 110 | cursor: w-resize; 111 | } 112 | .noUi-vertical .noUi-dragable { 113 | cursor: n-resize; 114 | } 115 | .noUi-handle { 116 | border: 1px solid #D9D9D9; 117 | border-radius: 3px; 118 | background: #FFF; 119 | cursor: default; 120 | box-shadow: inset 0 0 1px #FFF, 121 | inset 0 1px 7px #EBEBEB, 122 | 0 3px 6px -3px #BBB; 123 | } 124 | .noUi-active { 125 | box-shadow: inset 0 0 1px #FFF, 126 | inset 0 1px 7px #DDD, 127 | 0 3px 6px -3px #BBB; 128 | } 129 | 130 | /* Handle stripes; 131 | */ 132 | .noUi-handle:before, 133 | .noUi-handle:after { 134 | content: ""; 135 | display: block; 136 | position: absolute; 137 | height: 14px; 138 | width: 1px; 139 | background: #E8E7E6; 140 | left: 14px; 141 | top: 6px; 142 | } 143 | .noUi-handle:after { 144 | left: 17px; 145 | } 146 | .noUi-vertical .noUi-handle:before, 147 | .noUi-vertical .noUi-handle:after { 148 | width: 14px; 149 | height: 1px; 150 | left: 6px; 151 | top: 14px; 152 | } 153 | .noUi-vertical .noUi-handle:after { 154 | top: 17px; 155 | } 156 | 157 | /* Disabled state; 158 | */ 159 | [disabled].noUi-connect, 160 | [disabled] .noUi-connect { 161 | background: #B8B8B8; 162 | } 163 | [disabled] .noUi-handle { 164 | cursor: not-allowed; 165 | } 166 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/flot/jquery.flot.tooltip.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jquery.flot.tooltip 3 | * 4 | * description: easy-to-use tooltips for Flot charts 5 | * version: 0.6.2 6 | * author: Krzysztof Urbas @krzysu [myviews.pl] 7 | * website: https://github.com/krzysu/flot.tooltip 8 | * 9 | * build on 2013-09-30 10 | * released under MIT License, 2012 11 | */ 12 | (function(t){var o={tooltip:!1,tooltipOpts:{content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,shifts:{x:10,y:20},defaultTheme:!0,onHover:function(){}}},i=function(t){this.tipPosition={x:0,y:0},this.init(t)};i.prototype.init=function(o){function i(t){var o={};o.x=t.pageX,o.y=t.pageY,s.updateTooltipPosition(o)}function e(t,o,i){var e=s.getDomElement();if(i){var n;n=s.stringFormat(s.tooltipOptions.content,i),e.html(n),s.updateTooltipPosition({x:o.pageX,y:o.pageY}),e.css({left:s.tipPosition.x+s.tooltipOptions.shifts.x,top:s.tipPosition.y+s.tooltipOptions.shifts.y}).show(),"function"==typeof s.tooltipOptions.onHover&&s.tooltipOptions.onHover(i,e)}else e.hide().html("")}var s=this;o.hooks.bindEvents.push(function(o,n){s.plotOptions=o.getOptions(),s.plotOptions.tooltip!==!1&&void 0!==s.plotOptions.tooltip&&(s.tooltipOptions=s.plotOptions.tooltipOpts,s.getDomElement(),t(o.getPlaceholder()).bind("plothover",e),t(n).bind("mousemove",i))}),o.hooks.shutdown.push(function(o,s){t(o.getPlaceholder()).unbind("plothover",e),t(s).unbind("mousemove",i)})},i.prototype.getDomElement=function(){var o;return t("#flotTip").length>0?o=t("#flotTip"):(o=t("
").attr("id","flotTip"),o.appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&o.css({background:"#fff","z-index":"100",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),o},i.prototype.updateTooltipPosition=function(o){var i=t("#flotTip").outerWidth()+this.tooltipOptions.shifts.x,e=t("#flotTip").outerHeight()+this.tooltipOptions.shifts.y;o.x-t(window).scrollLeft()>t(window).innerWidth()-i&&(o.x-=i),o.y-t(window).scrollTop()>t(window).innerHeight()-e&&(o.y-=e),this.tipPosition.x=o.x,this.tipPosition.y=o.y},i.prototype.stringFormat=function(t,o){var i=/%p\.{0,1}(\d{0,})/,e=/%s/,s=/%x\.{0,1}(?:\d{0,})/,n=/%y\.{0,1}(?:\d{0,})/;return"function"==typeof t&&(t=t(o.series.label,o.series.data[o.dataIndex][0],o.series.data[o.dataIndex][1],o)),o.series.percent!==void 0&&(t=this.adjustValPrecision(i,t,o.series.percent)),o.series.label!==void 0&&(t=t.replace(e,o.series.label)),this.isTimeMode("xaxis",o)&&this.isXDateFormat(o)&&(t=t.replace(s,this.timestampToDate(o.series.data[o.dataIndex][0],this.tooltipOptions.xDateFormat))),this.isTimeMode("yaxis",o)&&this.isYDateFormat(o)&&(t=t.replace(n,this.timestampToDate(o.series.data[o.dataIndex][1],this.tooltipOptions.yDateFormat))),"number"==typeof o.series.data[o.dataIndex][0]&&(t=this.adjustValPrecision(s,t,o.series.data[o.dataIndex][0])),"number"==typeof o.series.data[o.dataIndex][1]&&(t=this.adjustValPrecision(n,t,o.series.data[o.dataIndex][1])),o.series.xaxis.tickFormatter!==void 0&&(t=t.replace(s,o.series.xaxis.tickFormatter(o.series.data[o.dataIndex][0],o.series.xaxis))),o.series.yaxis.tickFormatter!==void 0&&(t=t.replace(n,o.series.yaxis.tickFormatter(o.series.data[o.dataIndex][1],o.series.yaxis))),t},i.prototype.isTimeMode=function(t,o){return o.series[t].options.mode!==void 0&&"time"===o.series[t].options.mode},i.prototype.isXDateFormat=function(){return this.tooltipOptions.xDateFormat!==void 0&&null!==this.tooltipOptions.xDateFormat},i.prototype.isYDateFormat=function(){return this.tooltipOptions.yDateFormat!==void 0&&null!==this.tooltipOptions.yDateFormat},i.prototype.timestampToDate=function(o,i){var e=new Date(o);return t.plot.formatDate(e,i)},i.prototype.adjustValPrecision=function(t,o,i){var e,s=o.match(t);return null!==s&&""!==RegExp.$1&&(e=RegExp.$1,i=i.toFixed(e),o=o.replace(t,i)),o};var e=function(t){new i(t)};t.plot.plugins.push({init:e,options:o,name:"tooltip",version:"0.6.1"})})(jQuery); 13 | -------------------------------------------------------------------------------- /src/tools.php: -------------------------------------------------------------------------------- 1 | get()->toArray(); 30 | $menus = adminMenuTree($menus); 31 | return $menus; 32 | } 33 | } 34 | 35 | if (!function_exists('adminMenuTree')) { 36 | /** 37 | * @param array $menus 菜单节点 38 | * @param int $pid 父亲id 39 | * 40 | * @return string 41 | */ 42 | function adminMenuTree($menus, $pid = 0) 43 | { 44 | $guardName = Guard::ADMIN_GUARD; 45 | $arrs = []; 46 | foreach ($menus as $v) { 47 | // 是否有权限, 个别权限可以无限制访问 48 | if (!Auth::guard($guardName)->user()->hasAnyRole(config("lazy-admin.super-role", "administrator"))) { 49 | if (!Auth::guard($guardName)->user()->hasAnyRole(explode(',', $v['roles']))) { 50 | continue; 51 | } 52 | } 53 | if ($v['parent_id'] == $pid) { 54 | $v['son'] = adminMenuTree($menus, $v['id']); 55 | $arrs[] = $v; 56 | } 57 | } 58 | return $arrs; 59 | } 60 | } 61 | 62 | 63 | if (!function_exists('menu_tree_level')) { 64 | 65 | /** 66 | * @param array $menus 菜单节点 67 | * @param int $pid 父亲id 68 | * @param int $level 菜单层级 69 | * @param int $nosonid 无子列表id 70 | * 71 | * @return Collection 72 | */ 73 | function menu_tree_level($menus, $pid = 0, $level = 0, $nosonid = 0) 74 | { 75 | $arrs = collect(); 76 | foreach ($menus as $v) { 77 | if ($nosonid == $v['id']) { 78 | continue; 79 | } 80 | if ($v['parent_id'] == $pid) { 81 | $v['level'] = $level; 82 | $next = menu_tree_level($menus, $v['id'], ($v['level']+1), $nosonid); 83 | $v['next_count'] = $next->count(); 84 | $arrs->push($v); 85 | $arrs = $arrs->merge($next); 86 | } 87 | } 88 | return $arrs; 89 | } 90 | } 91 | 92 | 93 | if (!function_exists('lazy_url')) { 94 | 95 | /** 96 | * @param string $path 菜单地址 97 | * @param string $params 参数 98 | * 99 | * @return string 100 | */ 101 | function lazy_url($path, $params = []) 102 | { 103 | $prefix = config('lazy-admin.prefix'); 104 | $uri = sprintf('%s/%s', $prefix, $path); 105 | return url($uri, $params); 106 | } 107 | } 108 | 109 | 110 | if (!function_exists('ajaxReturn')) { 111 | 112 | /** 113 | * ajax返回 114 | * 115 | * @param integer $status 1成功。0失败 116 | * @param string $info 成功/失败信息 117 | * @param array $data 自定义数据 118 | * @return void 119 | */ 120 | function ajaxReturn($status = 1, $info = '', $data = []) 121 | { 122 | return response()->json( 123 | [ 124 | 'status' => $status, 125 | 'info' => $info?:($status==1?'success':'error'), 126 | 'data' => $data, 127 | ] 128 | ); 129 | } 130 | } 131 | 132 | if (!function_exists('adminUser')) { 133 | 134 | /** 135 | * 后台用户 136 | * 137 | * @return void 138 | */ 139 | function lazyAdminUser() 140 | { 141 | return auth(Guard::ADMIN_GUARD)->user(); 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /resources/views/user/update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @push('css') 5 | 6 | @endpush 7 | 8 | @section('content') 9 |
10 |
11 |
12 |
13 |
修改管理员
14 | 15 |
16 | 19 |
20 | 21 |
22 |
23 |
24 | 25 |
26 | 27 |
28 | 名称不可重复 29 |
30 |
31 |
32 | 33 |
34 | 35 |
36 |
37 |
38 | 39 |
40 | 邮箱用于登录 41 |
42 |
43 |
44 | 45 |
46 | 密码最少6位 47 |
48 |
49 | 50 |
51 | 52 |
53 | @foreach($list as $v) 54 | 57 | @endforeach 58 |
59 |
60 | 61 |
62 |
63 | 64 | 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | @endsection 73 | 74 | @push('scripts') 75 | 76 | 85 | @endpush 86 | -------------------------------------------------------------------------------- /resources/views/menu/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @section('content') 5 |
6 |
7 |
8 |
9 |
菜单管理
10 |
11 |
12 |
13 | @lazy_can('admin-menu-create') 14 |
15 | 21 |
22 | @end_lazy_can 23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | @foreach($list as $k => $v) 39 | 40 | 41 | 44 | 51 | 58 | 59 | 60 | 74 | 75 | @endforeach 76 | 77 |
序号菜单名称菜单地址icon创建时间修改时间操作
{{ $v['order'] }} 42 | {!!str_repeat("|---", $v['level'])!!}{{ $v['title'] }} 43 | 45 | @if(!empty($v['uri'])) 46 | {{ $v['uri'] }} 47 | @else 48 | - 49 | @endif 50 | 52 | @if(!empty($v['icon'])) 53 | 54 | @else 55 | - 56 | @endif 57 | {{ $v['created_at'] }}{{ $v['updated_at'] }} 61 | 62 | @lazy_can('admin-menu-update') 63 | 64 |  修改 65 | 66 | @end_lazy_can 67 | 68 | @lazy_can('admin-menu-delete') 69 | 70 |  删除 71 | 72 | @end_lazy_can 73 |
78 |
79 | 80 |
81 |
82 |
83 |
84 | @endsection 85 | 86 | @push('scripts') 87 | 92 | @endpush -------------------------------------------------------------------------------- /database/2019_01_07_025152_create_permission_tables.php: -------------------------------------------------------------------------------- 1 | increments('id'); 21 | $table->string('name'); 22 | $table->string('title'); 23 | $table->string('guard_name'); 24 | $table->timestamps(); 25 | }); 26 | 27 | Schema::create($tableNames['roles'], function (Blueprint $table) { 28 | $table->increments('id'); 29 | $table->string('name'); 30 | $table->string('title'); 31 | $table->string('guard_name'); 32 | $table->timestamps(); 33 | }); 34 | 35 | Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) { 36 | $table->unsignedInteger('permission_id'); 37 | $table->string('model_type'); 38 | $table->unsignedBigInteger($columnNames['model_morph_key']); 39 | // $table->index([$columnNames['model_morph_key'], 'model_type', ]); 40 | 41 | // $table->foreign('permission_id') 42 | // ->references('id') 43 | // ->on($tableNames['permissions']) 44 | // ->onDelete('cascade'); 45 | 46 | // $table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'], 47 | // 'model_has_permissions_permission_model_type_primary'); 48 | }); 49 | 50 | Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) { 51 | $table->unsignedInteger('role_id'); 52 | $table->string('model_type'); 53 | $table->unsignedBigInteger($columnNames['model_morph_key']); 54 | // $table->index([$columnNames['model_morph_key'], 'model_type', ]); 55 | // $table->foreign('role_id') 56 | // ->references('id') 57 | // ->on($tableNames['roles']) 58 | // ->onDelete('cascade'); 59 | 60 | // $table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'], 61 | // 'model_has_roles_role_model_type_primary'); 62 | }); 63 | 64 | Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { 65 | $table->unsignedInteger('permission_id'); 66 | $table->unsignedInteger('role_id'); 67 | 68 | // $table->foreign('permission_id') 69 | // ->references('id') 70 | // ->on($tableNames['permissions']) 71 | // ->onDelete('cascade'); 72 | 73 | // $table->foreign('role_id') 74 | // ->references('id') 75 | // ->on($tableNames['roles']) 76 | // ->onDelete('cascade'); 77 | 78 | // $table->primary(['permission_id', 'role_id']); 79 | 80 | // app('cache') 81 | // ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) 82 | // ->forget(config('permission.cache.key')); 83 | }); 84 | } 85 | 86 | /** 87 | * Reverse the migrations. 88 | * 89 | * @return void 90 | */ 91 | public function down() 92 | { 93 | $tableNames = config('permission.table_names'); 94 | 95 | Schema::drop($tableNames['role_has_permissions']); 96 | Schema::drop($tableNames['model_has_roles']); 97 | Schema::drop($tableNames['model_has_permissions']); 98 | Schema::drop($tableNames['roles']); 99 | Schema::drop($tableNames['permissions']); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/toastr/toastr.min.js: -------------------------------------------------------------------------------- 1 | !function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return f({type:O.error,iconClass:g().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=g()),v=e("#"+t.containerId),v.length?v:(n&&(v=c(t)),v)}function i(e,t,n){return f({type:O.info,iconClass:g().iconClasses.info,message:e,optionsOverride:n,title:t})}function o(e){w=e}function s(e,t,n){return f({type:O.success,iconClass:g().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return f({type:O.warning,iconClass:g().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e){var t=g();v||n(t),l(e,t)||u(t)}function d(t){var i=g();return v||n(i),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function u(t){for(var n=v.children(),i=n.length-1;i>=0;i--)l(e(n[i]),t)}function l(t,n){return t&&0===e(":focus",t).length?(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0):!1}function c(t){return v=e("
").attr("id",t.containerId).addClass(t.positionClass).attr("aria-live","polite").attr("role","alert"),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:'',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function m(e){w&&w(e)}function f(t){function i(t){return!e(":focus",l).length||t?(clearTimeout(O.intervalId),l[r.hideMethod]({duration:r.hideDuration,easing:r.hideEasing,complete:function(){h(l),r.onHidden&&"hidden"!==b.state&&r.onHidden(),b.state="hidden",b.endTime=new Date,m(b)}})):void 0}function o(){(r.timeOut>0||r.extendedTimeOut>0)&&(u=setTimeout(i,r.extendedTimeOut),O.maxHideTime=parseFloat(r.extendedTimeOut),O.hideEta=(new Date).getTime()+O.maxHideTime)}function s(){clearTimeout(u),O.hideEta=0,l.stop(!0,!0)[r.showMethod]({duration:r.showDuration,easing:r.showEasing})}function a(){var e=(O.hideEta-(new Date).getTime())/O.maxHideTime*100;f.width(e+"%")}var r=g(),d=t.iconClass||r.iconClass;if("undefined"!=typeof t.optionsOverride&&(r=e.extend(r,t.optionsOverride),d=t.optionsOverride.iconClass||d),r.preventDuplicates){if(t.message===C)return;C=t.message}T++,v=n(r,!0);var u=null,l=e("
"),c=e("
"),p=e("
"),f=e("
"),w=e(r.closeHtml),O={intervalId:null,hideEta:null,maxHideTime:null},b={toastId:T,state:"visible",startTime:new Date,options:r,map:t};return t.iconClass&&l.addClass(r.toastClass).addClass(d),t.title&&(c.append(t.title).addClass(r.titleClass),l.append(c)),t.message&&(p.append(t.message).addClass(r.messageClass),l.append(p)),r.closeButton&&(w.addClass("toast-close-button").attr("role","button"),l.prepend(w)),r.progressBar&&(f.addClass("toast-progress"),l.prepend(f)),l.hide(),r.newestOnTop?v.prepend(l):v.append(l),l[r.showMethod]({duration:r.showDuration,easing:r.showEasing,complete:r.onShown}),r.timeOut>0&&(u=setTimeout(i,r.timeOut),O.maxHideTime=parseFloat(r.timeOut),O.hideEta=(new Date).getTime()+O.maxHideTime,r.progressBar&&(O.intervalId=setInterval(a,10))),l.hover(s,o),!r.onclick&&r.tapToDismiss&&l.click(i),r.closeButton&&w&&w.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),i(!0)}),r.onclick&&l.click(function(){r.onclick(),i()}),m(b),r.debug&&console&&console.log(b),l}function g(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),C=void 0))}var v,w,C,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:d,error:t,getContainer:n,info:i,options:{},subscribe:o,success:s,version:"2.1.0",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}); 2 | //# sourceMappingURL=/toastr.js.map 3 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/gritter/jquery.gritter.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.gritter={};b.gritter.options={position:"",class_name:"",fade_in_speed:"medium",fade_out_speed:1000,time:6000};b.gritter.add=function(f){try{return a.add(f||{})}catch(d){var c="Gritter Error: "+d;(typeof(console)!="undefined"&&console.error)?console.error(c,f):alert(c)}};b.gritter.remove=function(d,c){a.removeSpecific(d,c||{})};b.gritter.removeAll=function(c){a.stop(c||{})};var a={position:"",fade_in_speed:"",fade_out_speed:"",time:"",_custom_timer:0,_item_count:0,_is_setup:0,_tpl_close:'Close Notification',_tpl_title:'[[title]]',_tpl_item:'',_tpl_wrap:'
',add:function(g){if(typeof(g)=="string"){g={text:g}}if(g.text===null){throw'You must supply "text" parameter.'}if(!this._is_setup){this._runSetup()}var k=g.title,n=g.text,e=g.image||"",l=g.sticky||false,m=g.class_name||b.gritter.options.class_name,j=b.gritter.options.position,d=g.time||"";this._verifyWrapper();this._item_count++;var f=this._item_count,i=this._tpl_item;b(["before_open","after_open","before_close","after_close"]).each(function(p,q){a["_"+q+"_"+f]=(b.isFunction(g[q]))?g[q]:function(){}});this._custom_timer=0;if(d){this._custom_timer=d}var c=(e!="")?'image':"",h=(e!="")?"gritter-with-image":"gritter-without-image";if(k){k=this._str_replace("[[title]]",k,this._tpl_title)}else{k=""}i=this._str_replace(["[[title]]","[[text]]","[[close]]","[[image]]","[[number]]","[[class_name]]","[[item_class]]"],[k,n,this._tpl_close,c,this._item_count,h,m],i);if(this["_before_open_"+f]()===false){return false}b("#gritter-notice-wrapper").addClass(j).append(i);var o=b("#gritter-item-"+this._item_count);o.fadeIn(this.fade_in_speed,function(){a["_after_open_"+f](b(this))});if(!l){this._setFadeTimer(o,f)}b(o).bind("mouseenter mouseleave",function(p){if(p.type=="mouseenter"){if(!l){a._restoreItemIfFading(b(this),f)}}else{if(!l){a._setFadeTimer(b(this),f)}}a._hoverState(b(this),p.type)});b(o).find(".gritter-close").click(function(){a.removeSpecific(f,{},null,true);return false;});return f},_countRemoveWrapper:function(c,d,f){d.remove();this["_after_close_"+c](d,f);if(b(".gritter-item-wrapper").length==0){b("#gritter-notice-wrapper").remove()}},_fade:function(g,d,j,f){var j=j||{},i=(typeof(j.fade)!="undefined")?j.fade:true,c=j.speed||this.fade_out_speed,h=f;this["_before_close_"+d](g,h);if(f){g.unbind("mouseenter mouseleave")}if(i){g.animate({opacity:0},c,function(){g.animate({height:0},300,function(){a._countRemoveWrapper(d,g,h)})})}else{this._countRemoveWrapper(d,g)}},_hoverState:function(d,c){if(c=="mouseenter"){d.addClass("hover");d.find(".gritter-close").show()}else{d.removeClass("hover");d.find(".gritter-close").hide()}},removeSpecific:function(c,g,f,d){if(!f){var f=b("#gritter-item-"+c)}this._fade(f,c,g||{},d)},_restoreItemIfFading:function(d,c){clearTimeout(this["_int_id_"+c]);d.stop().css({opacity:"",height:""})},_runSetup:function(){for(opt in b.gritter.options){this[opt]=b.gritter.options[opt]}this._is_setup=1},_setFadeTimer:function(f,d){var c=(this._custom_timer)?this._custom_timer:this.time;this["_int_id_"+d]=setTimeout(function(){a._fade(f,d)},c)},stop:function(e){var c=(b.isFunction(e.before_close))?e.before_close:function(){};var f=(b.isFunction(e.after_close))?e.after_close:function(){};var d=b("#gritter-notice-wrapper");c(d);d.fadeOut(function(){b(this).remove();f()})},_str_replace:function(v,e,o,n){var k=0,h=0,t="",m="",g=0,q=0,l=[].concat(v),c=[].concat(e),u=o,d=c instanceof Array,p=u instanceof Array;u=[].concat(u);if(n){this.window[n]=0}for(k=0,g=u.length;k", 76 | all[0] 77 | ) { 78 | return v > 4 ? v : undef; 79 | } 80 | }, 81 | 82 | //Enable the link on the second click. 83 | doubleTapToGo: function(elem) { 84 | var $this = this.element; 85 | 86 | //if the class "doubleTapToGo" exists, remove it and return 87 | if (elem.hasClass("doubleTapToGo")) { 88 | elem.removeClass("doubleTapToGo"); 89 | return true; 90 | } 91 | 92 | //does not exists, add a new class and return false 93 | if (elem.parent().children("ul").length) { 94 | //first remove all other class 95 | $this.find(".doubleTapToGo").removeClass("doubleTapToGo"); 96 | //add the class on the current element 97 | elem.addClass("doubleTapToGo"); 98 | return false; 99 | } 100 | }, 101 | 102 | remove: function() { 103 | this.element.off("." + pluginName); 104 | this.element.removeData(pluginName); 105 | } 106 | 107 | }; 108 | 109 | $.fn[pluginName] = function(options) { 110 | this.each(function () { 111 | var el = $(this); 112 | if (el.data(pluginName)) { 113 | el.data(pluginName).remove(); 114 | } 115 | el.data(pluginName, new Plugin(this, options)); 116 | }); 117 | return this; 118 | }; 119 | 120 | })(jQuery, window, document); 121 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/layer/extend/layer.ext.js: -------------------------------------------------------------------------------- 1 | /*! layer弹层组件拓展类 */ 2 | ;!function(){layer.use("skin/layer.ext.css",function(){layer.layui_layer_extendlayerextjs=!0});var a=layer.cache||{},b=function(b){return a.skin?" "+a.skin+" "+a.skin+"-"+b:""};layer.prompt=function(a,c){a=a||{},"function"==typeof a&&(c=a);var d,e=2==a.formType?'":function(){return''}();return layer.open($.extend({btn:["确定","取消"],content:e,skin:"layui-layer-prompt"+b("prompt"),success:function(a){d=a.find(".layui-layer-input"),d.focus()},yes:function(b){var e=d.val();""===e?d.focus():e.length>(a.maxlength||500)?layer.tips("最多输入"+(a.maxlength||500)+"个字数",d,{tips:1}):c&&c(e,b,d)}},a))},layer.tab=function(a){a=a||{};var c=a.tab||{};return layer.open($.extend({type:1,skin:"layui-layer-tab"+b("tab"),title:function(){var a=c.length,b=1,d="";if(a>0)for(d=''+c[0].title+"";a>b;b++)d+=""+c[b].title+"";return d}(),content:'
    '+function(){var a=c.length,b=1,d="";if(a>0)for(d='
  • '+(c[0].content||"no content")+"
  • ";a>b;b++)d+='
  • '+(c[b].content||"no content")+"
  • ";return d}()+"
",success:function(a){var b=a.find(".layui-layer-title").children(),c=a.find(".layui-layer-tabmain").children();b.on("mousedown",function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;var b=$(this),d=b.index();b.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),c.eq(d).show().siblings().hide()})}},a))},layer.photos=function(a,c,d){function e(a,b,c){var d=new Image;d.onload=function(){d.onload=null,b(d)},d.onerror=function(a){d.onerror=null,c(a)},d.src=a}var f={};if(a=a||{},a.photos){var g=a.photos.constructor===Object,h=g?a.photos:{},i=h.data||[],j=h.start||0;if(f.imgIndex=j+1,g){if(0===i.length)return void layer.msg("没有图片")}else{var k=$(a.photos),l=k.find(a.img||"img");if(0===l.length)return;if(c||k.find(h.img||"img").each(function(b){var c=$(this);i.push({alt:c.attr("alt"),pid:c.attr("layer-pid"),src:c.attr("layer-src")||c.attr("src"),thumb:c.attr("src")}),c.on("click",function(){layer.photos($.extend(a,{photos:{start:b,data:i,tab:a.tab},full:a.full}),!0)})}),!c)return}f.imgprev=function(a){f.imgIndex--,f.imgIndex<1&&(f.imgIndex=i.length),f.tabimg(a)},f.imgnext=function(a,b){f.imgIndex++,f.imgIndex>i.length&&(f.imgIndex=1,b)||f.tabimg(a)},f.keyup=function(a){if(!f.end){var b=a.keyCode;a.preventDefault(),37===b?f.imgprev(!0):39===b?f.imgnext(!0):27===b&&layer.close(f.index)}},f.tabimg=function(b){i.length<=1||(h.start=f.imgIndex-1,layer.close(f.index),layer.photos(a,!0,b))},f.event=function(){f.bigimg.hover(function(){f.imgsee.show()},function(){f.imgsee.hide()}),f.bigimg.find(".layui-layer-imgprev").on("click",function(a){a.preventDefault(),f.imgprev()}),f.bigimg.find(".layui-layer-imgnext").on("click",function(a){a.preventDefault(),f.imgnext()}),$(document).on("keyup",f.keyup)},f.loadi=layer.load(1,{shade:"shade"in a?!1:.9,scrollbar:!1}),e(i[j].src,function(c){layer.close(f.loadi),f.index=layer.open($.extend({type:1,area:function(){var b=[c.width,c.height],d=[$(window).width()-100,$(window).height()-100];return!a.full&&b[0]>d[0]&&(b[0]=d[0],b[1]=b[0]*d[1]/b[0]),[b[0]+"px",b[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,shift:5*Math.random()|0,skin:"layui-layer-photos"+b("photos"),content:'
'+(i[j].alt||
'+(i.length>1?'':"")+'
'+(i[j].alt||"")+""+f.imgIndex+"/"+i.length+"
",success:function(b,c){f.bigimg=b.find(".layui-layer-phimg"),f.imgsee=b.find(".layui-layer-imguide,.layui-layer-imgbar"),f.event(b),a.tab&&a.tab(i[j],b)},end:function(){f.end=!0,$(document).off("keyup",f.keyup)}},a))},function(){layer.close(f.loadi),layer.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){i.length>1&&f.imgnext(!0,!0)}})})}}}(); 3 | -------------------------------------------------------------------------------- /resources/assets/css/plugins/clockpicker/clockpicker.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ClockPicker v{package.version} for Bootstrap (http://weareoutman.github.io/clockpicker/) 3 | * Copyright 2014 Wang Shenwei. 4 | * Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE) 5 | */ 6 | 7 | .clockpicker .input-group-addon { 8 | cursor: pointer; 9 | } 10 | .clockpicker-moving { 11 | cursor: move; 12 | } 13 | .clockpicker-align-left.popover > .arrow { 14 | left: 25px; 15 | } 16 | .clockpicker-align-top.popover > .arrow { 17 | top: 17px; 18 | } 19 | .clockpicker-align-right.popover > .arrow { 20 | left: auto; 21 | right: 25px; 22 | } 23 | .clockpicker-align-bottom.popover > .arrow { 24 | top: auto; 25 | bottom: 6px; 26 | } 27 | .clockpicker-popover .popover-title { 28 | background-color: #fff; 29 | color: #999; 30 | font-size: 24px; 31 | font-weight: bold; 32 | line-height: 30px; 33 | text-align: center; 34 | } 35 | .clockpicker-popover .popover-title span { 36 | cursor: pointer; 37 | } 38 | .clockpicker-popover .popover-content { 39 | background-color: #f8f8f8; 40 | padding: 12px; 41 | } 42 | .popover-content:last-child { 43 | border-bottom-left-radius: 5px; 44 | border-bottom-right-radius: 5px; 45 | } 46 | .clockpicker-plate { 47 | background-color: #fff; 48 | border: 1px solid #ccc; 49 | border-radius: 50%; 50 | width: 200px; 51 | height: 200px; 52 | overflow: visible; 53 | position: relative; 54 | /* Disable text selection highlighting. Thanks to Hermanya */ 55 | -webkit-touch-callout: none; 56 | -webkit-user-select: none; 57 | -khtml-user-select: none; 58 | -moz-user-select: none; 59 | -ms-user-select: none; 60 | user-select: none; 61 | } 62 | .clockpicker-canvas, 63 | .clockpicker-dial { 64 | width: 200px; 65 | height: 200px; 66 | position: absolute; 67 | left: -1px; 68 | top: -1px; 69 | } 70 | .clockpicker-minutes { 71 | visibility: hidden; 72 | } 73 | .clockpicker-tick { 74 | border-radius: 50%; 75 | color: #666; 76 | line-height: 26px; 77 | text-align: center; 78 | width: 26px; 79 | height: 26px; 80 | position: absolute; 81 | cursor: pointer; 82 | } 83 | .clockpicker-tick.active, 84 | .clockpicker-tick:hover { 85 | background-color: rgb(192, 229, 247); 86 | background-color: rgba(0, 149, 221, .25); 87 | } 88 | .clockpicker-button { 89 | background-image: none; 90 | background-color: #fff; 91 | border-width: 1px 0 0; 92 | border-top-left-radius: 0; 93 | border-top-right-radius: 0; 94 | margin: 0; 95 | padding: 10px 0; 96 | } 97 | .clockpicker-button:hover { 98 | background-image: none; 99 | background-color: #ebebeb; 100 | } 101 | .clockpicker-button:focus { 102 | outline: none!important; 103 | } 104 | .clockpicker-dial { 105 | -webkit-transition: -webkit-transform 350ms, opacity 350ms; 106 | -moz-transition: -moz-transform 350ms, opacity 350ms; 107 | -ms-transition: -ms-transform 350ms, opacity 350ms; 108 | -o-transition: -o-transform 350ms, opacity 350ms; 109 | transition: transform 350ms, opacity 350ms; 110 | } 111 | .clockpicker-dial-out { 112 | opacity: 0; 113 | } 114 | .clockpicker-hours.clockpicker-dial-out { 115 | -webkit-transform: scale(1.2, 1.2); 116 | -moz-transform: scale(1.2, 1.2); 117 | -ms-transform: scale(1.2, 1.2); 118 | -o-transform: scale(1.2, 1.2); 119 | transform: scale(1.2, 1.2); 120 | } 121 | .clockpicker-minutes.clockpicker-dial-out { 122 | -webkit-transform: scale(.8, .8); 123 | -moz-transform: scale(.8, .8); 124 | -ms-transform: scale(.8, .8); 125 | -o-transform: scale(.8, .8); 126 | transform: scale(.8, .8); 127 | } 128 | .clockpicker-canvas { 129 | -webkit-transition: opacity 175ms; 130 | -moz-transition: opacity 175ms; 131 | -ms-transition: opacity 175ms; 132 | -o-transition: opacity 175ms; 133 | transition: opacity 175ms; 134 | } 135 | .clockpicker-canvas-out { 136 | opacity: 0.25; 137 | } 138 | .clockpicker-canvas-bearing, 139 | .clockpicker-canvas-fg { 140 | stroke: none; 141 | fill: rgb(0, 149, 221); 142 | } 143 | .clockpicker-canvas-bg { 144 | stroke: none; 145 | fill: rgb(192, 229, 247); 146 | } 147 | .clockpicker-canvas-bg-trans { 148 | fill: rgba(0, 149, 221, .25); 149 | } 150 | .clockpicker-canvas line { 151 | stroke: rgb(0, 149, 221); 152 | stroke-width: 1; 153 | stroke-linecap: round; 154 | /*shape-rendering: crispEdges;*/ 155 | } 156 | .clockpicker-button.am-button { 157 | margin: 1px; 158 | padding: 5px; 159 | border: 1px solid rgba(0, 0, 0, .2); 160 | border-radius: 4px; 161 | 162 | } 163 | .clockpicker-button.pm-button { 164 | margin: 1px 1px 1px 136px; 165 | padding: 5px; 166 | border: 1px solid rgba(0, 0, 0, .2); 167 | border-radius: 4px; 168 | } 169 | -------------------------------------------------------------------------------- /resources/assets/js/plugins/slimscroll/jquery.slimscroll.min.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * 5 | * Version: 1.3.0 6 | * 7 | */ 8 | (function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"4px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d|| 9 | window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,h){k=!1;var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&s||(x||y)||(c.fadeOut("slow"),g.fadeOut("slow"))},1E3))}var s,x,y,A,z,u,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(), 12 | c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);w();if(f.isPlainObject(h)){if("height"in h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in h)n=parseInt(a.scrollTo);else if("scrollBy"in h)n+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;n=f("
").addClass(a.wrapperClass).css({position:"relative",width:a.width,height:a.height});b.css({width:a.width,height:a.height});var g=f("
").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("
").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible? 13 | "block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};g.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(g);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)}); 14 | b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});g.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){s=!0;v();p()},function(){s=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&& 15 | (m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery); 16 | -------------------------------------------------------------------------------- /resources/views/role/menu.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('lazy-view::layout') 3 | 4 | @push('css') 5 | 6 | 19 | @endpush 20 | 21 | @section('content') 22 |
23 |
24 |
25 |
26 |
设置用户菜单权限
27 | 28 |
29 | 32 |
33 | 34 |
35 |
36 |
37 | 38 |
39 | @foreach($list as $v) 40 |
41 | 46 |
47 | @endforeach 48 |
49 |
50 |
51 |
52 | 53 | 重置 54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | @endsection 62 | 63 | @push('scripts') 64 | 65 | 124 | @endpush --------------------------------------------------------------------------------