├── CHANGELOG.md ├── LICENSE ├── README.md ├── composer.json ├── config └── admin.php ├── database └── migrations │ ├── 2019_01_30_080034_create_admins_table.php │ ├── 2019_01_30_080743_create_action_logs_table.php │ ├── 2019_01_30_083510_create_configs_table.php │ ├── 2019_01_30_083614_create_files_table.php │ ├── 2019_01_30_091501_create_menus_table.php │ ├── 2019_02_11_081942_create_pictures_table.php │ ├── 2019_03_08_081738_create_permission_tables.php │ ├── 2019_10_17_092404_create_picture_categories_table.php │ └── 2019_10_17_093935_create_file_categories_table.php ├── public ├── apps │ └── app1.html ├── config.json ├── default.png ├── favicon.ico ├── index.html ├── tinymce │ ├── icons │ │ └── default │ │ │ └── icons.min.js │ ├── langs │ │ ├── readme.md │ │ └── zh_CN.js │ ├── license.txt │ ├── plugins │ │ ├── advlist │ │ │ └── plugin.min.js │ │ ├── anchor │ │ │ └── plugin.min.js │ │ ├── autolink │ │ │ └── plugin.min.js │ │ ├── autoresize │ │ │ └── plugin.min.js │ │ ├── autosave │ │ │ └── plugin.min.js │ │ ├── bbcode │ │ │ └── plugin.min.js │ │ ├── charmap │ │ │ └── plugin.min.js │ │ ├── code │ │ │ └── plugin.min.js │ │ ├── codesample │ │ │ └── plugin.min.js │ │ ├── colorpicker │ │ │ └── plugin.min.js │ │ ├── contextmenu │ │ │ └── plugin.min.js │ │ ├── directionality │ │ │ └── plugin.min.js │ │ ├── emoticons │ │ │ ├── js │ │ │ │ ├── emojiimages.js │ │ │ │ ├── emojiimages.min.js │ │ │ │ ├── emojis.js │ │ │ │ └── emojis.min.js │ │ │ └── plugin.min.js │ │ ├── formatpainter │ │ │ └── plugin.min.js │ │ ├── fullpage │ │ │ └── plugin.min.js │ │ ├── fullscreen │ │ │ └── plugin.min.js │ │ ├── help │ │ │ └── plugin.min.js │ │ ├── hr │ │ │ └── plugin.min.js │ │ ├── image │ │ │ └── plugin.min.js │ │ ├── imagetools │ │ │ └── plugin.min.js │ │ ├── importcss │ │ │ └── plugin.min.js │ │ ├── indent2em │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── insertdatetime │ │ │ └── plugin.min.js │ │ ├── legacyoutput │ │ │ └── plugin.min.js │ │ ├── link │ │ │ └── plugin.min.js │ │ ├── lists │ │ │ └── plugin.min.js │ │ ├── media │ │ │ └── plugin.min.js │ │ ├── multipleimage │ │ │ └── plugin.min.js │ │ ├── nonbreaking │ │ │ └── plugin.min.js │ │ ├── noneditable │ │ │ └── plugin.min.js │ │ ├── pagebreak │ │ │ └── plugin.min.js │ │ ├── paste │ │ │ └── plugin.min.js │ │ ├── preview │ │ │ └── plugin.min.js │ │ ├── print │ │ │ └── plugin.min.js │ │ ├── quickbars │ │ │ └── plugin.min.js │ │ ├── save │ │ │ └── plugin.min.js │ │ ├── searchreplace │ │ │ └── plugin.min.js │ │ ├── spellchecker │ │ │ └── plugin.min.js │ │ ├── tabfocus │ │ │ └── plugin.min.js │ │ ├── table │ │ │ └── plugin.min.js │ │ ├── template │ │ │ └── plugin.min.js │ │ ├── textcolor │ │ │ └── plugin.min.js │ │ ├── textpattern │ │ │ └── plugin.min.js │ │ ├── toc │ │ │ └── plugin.min.js │ │ ├── visualblocks │ │ │ └── plugin.min.js │ │ ├── visualchars │ │ │ └── plugin.min.js │ │ └── wordcount │ │ │ └── plugin.min.js │ ├── skins │ │ ├── content │ │ │ ├── dark │ │ │ │ └── content.min.css │ │ │ ├── default │ │ │ │ └── content.min.css │ │ │ ├── document │ │ │ │ └── content.min.css │ │ │ └── writer │ │ │ │ └── content.min.css │ │ └── ui │ │ │ ├── oxide-dark │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── content.mobile.min.css │ │ │ ├── fonts │ │ │ │ └── tinymce-mobile.woff │ │ │ ├── skin.min.css │ │ │ ├── skin.mobile.min.css │ │ │ └── skin.shadowdom.min.css │ │ │ └── oxide │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── content.mobile.min.css │ │ │ ├── fonts │ │ │ └── tinymce-mobile.woff │ │ │ ├── skin.min.css │ │ │ ├── skin.mobile.min.css │ │ │ └── skin.shadowdom.min.css │ ├── themes │ │ ├── mobile │ │ │ └── theme.min.js │ │ └── silver │ │ │ └── theme.min.js │ ├── tinymce.d.ts │ └── tinymce.min.js ├── umi.css └── umi.js ├── resources ├── lang │ ├── en │ │ └── admin.php │ ├── zh-CN │ │ └── admin.php │ └── zh-TW │ │ └── admin.php └── views │ └── index.blade.php ├── routes └── api.php ├── src ├── Admin │ ├── Actions │ │ ├── Action.php │ │ ├── Drawer.php │ │ ├── Dropdown.php │ │ ├── Js.php │ │ ├── Link.php │ │ └── Modal.php │ ├── Admin.php │ ├── AdminServiceProvider.php │ ├── Console │ │ ├── InstallCommand.php │ │ ├── PublishCommand.php │ │ ├── ResourceCommand.php │ │ ├── UpdateCommand.php │ │ └── stubs │ │ │ ├── Actions │ │ │ ├── ChangeAccount.php │ │ │ ├── ChangeStatus.php │ │ │ ├── ChangeWebConfig.php │ │ │ ├── CreateDrawer.php │ │ │ ├── CreateLink.php │ │ │ ├── CreateModal.php │ │ │ ├── Delete.php │ │ │ ├── DetailLink.php │ │ │ ├── Disable.php │ │ │ ├── EditDrawer.php │ │ │ ├── EditLink.php │ │ │ ├── EditModal.php │ │ │ ├── Enable.php │ │ │ ├── FormBack.php │ │ │ ├── FormExtraBack.php │ │ │ ├── FormReset.php │ │ │ ├── FormSubmit.php │ │ │ ├── Import.php │ │ │ ├── MoreActions.php │ │ │ └── SyncPermission.php │ │ │ ├── Dashboards │ │ │ └── Index.php │ │ │ ├── Metrics │ │ │ ├── SystemInfo.php │ │ │ ├── TeamInfo.php │ │ │ ├── TotalAdmins.php │ │ │ ├── TotalFiles.php │ │ │ ├── TotalLogs.php │ │ │ └── TotalPictures.php │ │ │ ├── Resources │ │ │ ├── Account.php │ │ │ ├── ActionLog.php │ │ │ ├── Admin.php │ │ │ ├── Config.php │ │ │ ├── File.php │ │ │ ├── Menu.php │ │ │ ├── Permission.php │ │ │ ├── Picture.php │ │ │ ├── Role.php │ │ │ └── WebConfig.php │ │ │ ├── Searches │ │ │ ├── DateTimeRange.php │ │ │ ├── Input.php │ │ │ └── Status.php │ │ │ ├── UpgradeController.stub │ │ │ ├── resource.stub │ │ │ └── routes.stub │ ├── Dashboard.php │ ├── Excels │ │ ├── Export.php │ │ └── Import.php │ ├── Exceptions │ │ └── AuthenticationException.php │ ├── Facades │ │ └── Admin.php │ ├── Field.php │ ├── Http │ │ ├── Controllers │ │ │ ├── CaptchaController.php │ │ │ ├── Controller.php │ │ │ ├── DashboardController.php │ │ │ ├── FileController.php │ │ │ ├── LoginController.php │ │ │ ├── PagesController.php │ │ │ ├── PictureController.php │ │ │ ├── ResourceActionController.php │ │ │ ├── ResourceCreateController.php │ │ │ ├── ResourceEditController.php │ │ │ ├── ResourceEditableController.php │ │ │ ├── ResourceExportController.php │ │ │ ├── ResourceImportController.php │ │ │ ├── ResourceIndexController.php │ │ │ ├── ResourceShowController.php │ │ │ ├── ResourceStoreController.php │ │ │ └── ResourceUpdateController.php │ │ ├── Middleware │ │ │ ├── AdminMiddleware.php │ │ │ └── RedirectIfAuthenticated.php │ │ └── Requests │ │ │ ├── DashboardRequest.php │ │ │ ├── QuarkRequest.php │ │ │ ├── ResourceActionRequest.php │ │ │ ├── ResourceCreateRequest.php │ │ │ ├── ResourceDetailRequest.php │ │ │ ├── ResourceEditRequest.php │ │ │ ├── ResourceEditableRequest.php │ │ │ ├── ResourceExportRequest.php │ │ │ ├── ResourceImportRequest.php │ │ │ ├── ResourceIndexRequest.php │ │ │ ├── ResourceStoreRequest.php │ │ │ └── ResourceUpdateRequest.php │ ├── Layout.php │ ├── Login.php │ ├── Metrics │ │ ├── Descriptions.php │ │ ├── Lists.php │ │ ├── Metric.php │ │ ├── Trend.php │ │ └── Value.php │ ├── Models │ │ ├── ActionLog.php │ │ ├── Admin.php │ │ ├── Config.php │ │ ├── File.php │ │ ├── FileCategory.php │ │ ├── Menu.php │ │ ├── Picture.php │ │ └── PictureCategory.php │ ├── PerformsQueries.php │ ├── PerformsValidation.php │ ├── ResolvesActions.php │ ├── ResolvesFields.php │ ├── ResolvesFilters.php │ ├── ResolvesSearches.php │ ├── Resource.php │ ├── Rules │ │ └── .gitignore │ ├── Searches │ │ ├── Cascader.php │ │ ├── Date.php │ │ ├── DateRange.php │ │ ├── DateTime.php │ │ ├── DateTimeRange.php │ │ ├── Search.php │ │ └── Select.php │ └── helpers.php └── Quark │ ├── Component │ ├── Action │ │ ├── Action.php │ │ ├── Drawer.php │ │ └── Modal.php │ ├── Button │ │ └── Button.php │ ├── Card │ │ └── Card.php │ ├── Chart │ │ ├── Chart.php │ │ ├── Item.php │ │ └── Line.php │ ├── Descriptions │ │ ├── Descriptions.php │ │ ├── Field.php │ │ └── Fields │ │ │ ├── Image.php │ │ │ ├── Item.php │ │ │ ├── Link.php │ │ │ └── Text.php │ ├── Divider │ │ └── Divider.php │ ├── Dropdown │ │ ├── Dropdown.php │ │ └── Item.php │ ├── Element.php │ ├── Form │ │ ├── Field.php │ │ ├── Fields │ │ │ ├── Cascader.php │ │ │ ├── Checkbox.php │ │ │ ├── Date.php │ │ │ ├── DateRange.php │ │ │ ├── Datetime.php │ │ │ ├── DatetimeRange.php │ │ │ ├── Display.php │ │ │ ├── Editor.php │ │ │ ├── File.php │ │ │ ├── Group.php │ │ │ ├── Hidden.php │ │ │ ├── Icon.php │ │ │ ├── Image.php │ │ │ ├── Item.php │ │ │ ├── ListField.php │ │ │ ├── Map.php │ │ │ ├── Month.php │ │ │ ├── Number.php │ │ │ ├── Password.php │ │ │ ├── Quarter.php │ │ │ ├── Radio.php │ │ │ ├── Search.php │ │ │ ├── Select.php │ │ │ ├── Selects.php │ │ │ ├── SwitchField.php │ │ │ ├── Text.php │ │ │ ├── TextArea.php │ │ │ ├── Time.php │ │ │ ├── TimeRange.php │ │ │ ├── Tree.php │ │ │ ├── Week.php │ │ │ └── Year.php │ │ └── Form.php │ ├── Grid │ │ ├── Col.php │ │ └── Row.php │ ├── Layout │ │ ├── Footer.php │ │ ├── Layout.php │ │ ├── Page.php │ │ ├── PageContainer.php │ │ └── PageContainer │ │ │ └── PageHeader.php │ ├── Lists │ │ ├── Lists.php │ │ └── Meta.php │ ├── Login │ │ └── Login.php │ ├── Menu │ │ ├── Divider.php │ │ ├── Item.php │ │ ├── ItemGroup.php │ │ ├── Menu.php │ │ └── SubMenu.php │ ├── Space │ │ └── Space.php │ ├── Statistic │ │ ├── Statistic.php │ │ └── StatisticCard.php │ ├── Table │ │ ├── Column.php │ │ ├── Search.php │ │ ├── Search │ │ │ ├── Fields │ │ │ │ ├── Between.php │ │ │ │ ├── Equal.php │ │ │ │ ├── Group.php │ │ │ │ ├── Gt.php │ │ │ │ ├── In.php │ │ │ │ ├── Like.php │ │ │ │ ├── Lt.php │ │ │ │ ├── NotIn.php │ │ │ │ ├── Scope.php │ │ │ │ └── Where.php │ │ │ └── Item.php │ │ ├── Table.php │ │ ├── ToolBar.php │ │ └── ToolBar │ │ │ ├── Item.php │ │ │ └── Menu.php │ ├── Tabs │ │ ├── TabPane.php │ │ └── Tabs.php │ ├── Tpl │ │ └── Tpl.php │ └── Traits │ │ └── Button.php │ ├── Console │ ├── PublishCommand.php │ └── UpdateCommand.php │ ├── Facades │ ├── Action.php │ ├── Card.php │ ├── Chart.php │ ├── Col.php │ ├── Column.php │ ├── DescriptionField.php │ ├── Descriptions.php │ ├── Divider.php │ ├── Dropdown.php │ ├── Facade.php │ ├── Field.php │ ├── Footer.php │ ├── Form.php │ ├── Layout.php │ ├── Line.php │ ├── Lists.php │ ├── Login.php │ ├── Menu.php │ ├── Meta.php │ ├── Page.php │ ├── PageContainer.php │ ├── Row.php │ ├── Search.php │ ├── Space.php │ ├── Statistic.php │ ├── StatisticCard.php │ ├── TabPane.php │ ├── Table.php │ ├── Tabs.php │ ├── ToolBar.php │ ├── ToolBarMenu.php │ └── Tpl.php │ └── helpers.php └── tests └── .gitignore /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 介绍 2 | QuarkAdmin 是一个可以帮你快速搭建管理后台的工具;它提供的丰富组件,能帮助您使用很少的代码就能搭建出功能完善的管理后台。 3 | 4 | ## 系统特性 5 | 6 | **内置功能** 7 | * 管理员管理 8 | * 用户管理 9 | * 权限系统 10 | * 菜单管理 11 | * 系统配置 12 | * 操作日志 13 | * 附件管理 14 | 15 | **内置组件** 16 | * Layout组件 17 | * Container组件 18 | * Card组件 19 | * Table组件 20 | * Form组件 21 | * Show组件 22 | * TabForm组件 23 | * ... 24 | 25 | ## 安装 26 | 27 | 需要安装PHP7.2+ 和 Laravel8.0+,首先确保安装好了laravel,并且数据库连接设置正确。 28 | 29 | ``` bash 30 | # 第一步,安装依赖 31 | composer require quarkcloudio/quark-per 32 | 33 | # 第二步,然后运行下面的命令来发布资源: 34 | php artisan quarkadmin:publish 35 | 36 | # 第三步,然后运行下面的命令完成安装: 37 | php artisan quarkadmin:install 38 | ``` 39 | 40 | 运行命令的时候,如果遇到了下面的错误: 41 | 42 | SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes ... 43 | 44 | 您可以找到 config 目录下的 database.php 文件,进行更改: 45 | ``` php 46 | // 将 strict 改为 false 47 | 'strict' => false, 48 | // 将 engine 改为 'InnoDB' 49 | 'engine' => 'InnoDB', 50 | ``` 51 | 52 | 完成安装后,执行如下命令,快速启动服务: 53 | ``` bash 54 | php artisan serve 55 | ``` 56 | 后台地址: http://127.0.0.1:8000/admin/index 57 | 58 | 默认用户名:administrator 密码:123456 59 | 60 | 61 | ## 更新 62 | 63 | ``` bash 64 | # 第一步,更新依赖 65 | composer update quarkcloudio/quark-per 66 | 67 | # 第二步,执行更新命令 68 | php artisan quarkadmin:update 69 | ``` 70 | 71 | ## 演示站点 72 | 73 | 网址:[http://per.quarkcloud.io/admin/](http://per.quarkcloud.io/admin/) 74 | 75 | 用户名:administrator 密码:123456 76 | 77 | ## 技术支持 78 | 为了避免打扰作者日常工作,你可以在Github上提交 [Issues](https://github.com/quarkcloudio/quark-per/issues) 79 | 80 | 相关教程,你可以查看 [在线文档](http://www.quarkcloud.io/quark-per/) 81 | 82 | ## License 83 | QuarkAdmin is licensed under The MIT License (MIT). -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quarkcloudio/quark-per", 3 | "description": "quark-admin", 4 | "keywords": [ 5 | "quark-admin", 6 | "laravel", 7 | "laravel-admin", 8 | "sdk" 9 | ], 10 | "license": "MIT", 11 | "authors": [ 12 | { 13 | "name": "tangtanglove", 14 | "email": "dai_hang_love@126.com" 15 | } 16 | ], 17 | "require": { 18 | "php": ">=7.2", 19 | "spatie/laravel-permission": "^3.0", 20 | "gregwar/captcha": "^1.0", 21 | "aliyuncs/oss-sdk-php": "^2.0", 22 | "guzzlehttp/guzzle": "^6.2|^7.0", 23 | "maatwebsite/excel": "^3.1" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "QuarkCloudIO\\Quark\\": "src/Quark/", 28 | "QuarkCloudIO\\QuarkAdmin\\": "src/Admin/" 29 | }, 30 | "files": [ 31 | "src/Quark/helpers.php", 32 | "src/Admin/helpers.php" 33 | ] 34 | }, 35 | "extra": { 36 | "laravel": { 37 | "providers": [ 38 | "QuarkCloudIO\\QuarkAdmin\\AdminServiceProvider" 39 | ], 40 | "aliases": { 41 | "QuarkAdmin": "QuarkCloudIO\\QuarkAdmin\\Facades\\Admin" 42 | } 43 | } 44 | }, 45 | "config": { 46 | "sort-packages": true 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /database/migrations/2019_01_30_080034_create_admins_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 18 | $table->string('username',20)->unique(); 19 | $table->string('nickname'); 20 | $table->string('email',50)->unique(); 21 | $table->string('phone',11)->unique(); 22 | $table->tinyInteger('sex')->default(1); 23 | $table->string('password'); 24 | $table->string('avatar')->nullable(); 25 | $table->string('wechat_openid')->nullable()->default(''); 26 | $table->string('wechat_unionid')->nullable()->default(''); 27 | $table->string('qq_openid')->nullable()->default(''); 28 | $table->string('weibo_uid')->nullable()->default(''); 29 | $table->string('last_login_ip')->nullable()->default(''); 30 | $table->timestamp('last_login_time')->nullable(); 31 | $table->boolean('status')->default(1); 32 | $table->rememberToken(); 33 | $table->timestamps(); 34 | $table->softDeletes(); 35 | }); 36 | } 37 | 38 | /** 39 | * Reverse the migrations. 40 | * 41 | * @return void 42 | */ 43 | public function down() 44 | { 45 | Schema::dropIfExists('admins'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /database/migrations/2019_01_30_080743_create_action_logs_table.php: -------------------------------------------------------------------------------- 1 | engine='innodb'; 18 | $table->increments('id')->unsigned(); 19 | $table->integer('object_id')->nullable(); 20 | $table->longText('url'); 21 | $table->longText('remark'); 22 | $table->string('ip'); 23 | $table->string('type'); 24 | $table->boolean('status')->default(1); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('action_logs'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2019_01_30_083510_create_configs_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 18 | $table->string('title'); 19 | $table->string('type'); 20 | $table->string('name'); 21 | $table->integer('sort')->default(0)->nullable(); 22 | $table->string('group_name'); 23 | $table->longText('value')->nullable(); 24 | $table->longText('remark')->nullable(); 25 | $table->boolean('status')->default(1); 26 | $table->timestamps(); 27 | $table->softDeletes(); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('configs'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2019_01_30_083614_create_files_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id')->unsigned(); 19 | $table->string('obj_type')->default('ADMINID')->comment('文件归属角色的类型(ADMINID/UID/SHOPID/MCHID等)'); 20 | $table->integer('obj_id')->default(0)->nullable()->comment('文件归属角色id,用于将来统计用户使用空间大小'); 21 | $table->integer('file_category_id')->default(0)->nullable()->comment('文件目录id'); 22 | $table->integer('sort')->default(0)->nullable(); 23 | $table->string('name')->comment('名称'); 24 | $table->string('size')->comment('文件大小'); 25 | $table->string('ext')->default(0)->nullable()->comment('文件扩展名'); 26 | $table->text('path')->comment('路径'); 27 | $table->longText('md5')->comment('md5唯一标识'); 28 | $table->boolean('status')->default(1); 29 | $table->timestamps(); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('files'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2019_01_30_091501_create_menus_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id')->unsigned(); 19 | $table->string('name'); 20 | $table->string('guard_name'); 21 | $table->string('icon')->nullable()->default(''); 22 | $table->string('type')->nullable()->default('default'); 23 | $table->integer('pid')->default(0); 24 | $table->integer('sort')->default(0)->nullable(); 25 | $table->string('path')->nullable()->default(''); 26 | $table->boolean('show')->default(1); 27 | $table->boolean('status')->default(1); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('menus'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2019_02_11_081942_create_pictures_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id')->unsigned(); 19 | $table->string('obj_type')->default('ADMINID')->comment('图片归属角色的类型(ADMINID/UID/SHOPID/MCHID等)'); 20 | $table->integer('obj_id')->default(0)->nullable()->comment('图片归属角色id,用于将来统计用户使用空间大小'); 21 | $table->integer('picture_category_id')->default(0)->nullable()->comment('图片目录id'); 22 | $table->integer('sort')->default(0)->nullable(); 23 | $table->string('name')->comment('名称'); 24 | $table->string('size')->comment('文件大小'); 25 | $table->integer('width')->default(0)->nullable()->comment('宽度'); 26 | $table->integer('height')->default(0)->nullable()->comment('高度'); 27 | $table->string('ext')->default(0)->nullable()->comment('文件扩展名'); 28 | $table->text('path')->comment('路径'); 29 | $table->longText('md5')->comment('md5唯一标识'); 30 | $table->boolean('status')->default(1); 31 | $table->timestamps(); 32 | }); 33 | } 34 | 35 | /** 36 | * Reverse the migrations. 37 | * 38 | * @return void 39 | */ 40 | public function down() 41 | { 42 | Schema::dropIfExists('pictures'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/2019_10_17_092404_create_picture_categories_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('obj_type')->default('ADMINID')->comment('图片归属角色的类型(ADMINID/UID/SHOPID/MCHID等)'); 19 | $table->integer('obj_id')->default(0)->nullable()->comment('图片归属角色id,用于将来多用户角色使用'); 20 | $table->string('title'); 21 | $table->integer('sort')->default(0)->nullable(); 22 | $table->string('description')->nullable()->comment('分类描述')->default(''); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::table('picture_categories', function (Blueprint $table) { 34 | Schema::dropIfExists('picture_categories'); 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2019_10_17_093935_create_file_categories_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('obj_type')->default('ADMINID')->comment('图片归属角色的类型(ADMINID/UID/SHOPID/MCHID等)'); 19 | $table->integer('obj_id')->default(0)->nullable()->comment('图片归属角色id,用于将来多用户角色使用'); 20 | $table->string('title'); 21 | $table->integer('sort')->default(0)->nullable(); 22 | $table->string('description')->nullable()->comment('分类描述')->default(''); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::table('file_categories', function (Blueprint $table) { 34 | Schema::dropIfExists('file_categories'); 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /public/apps/app1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |"+a+"
":a}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),r="mce-pagebreak";n.add("pagebreak",(function(n){var t,o,c,i,g,u;function l(){return o.execCommand("mcePageBreak")}function m(){return e(c)}(t=n).addCommand("mcePageBreak",(function(){t.insertContent(a(e(t)))})),(o=n).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:l}),o.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:l}),i=(c=n).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),g=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(function(e){return"\\"+e})),"gi"),c.on("BeforeSetContent",(function(e){e.content=e.content.replace(g,a(m()))})),c.on("PreInit",(function(){c.serializer.addNodeFilter("img",(function(e){for(var a,n,t,o=e.length;o--;)(t=(n=e[o]).attr("class"))&&-1!==t.indexOf(r)&&(a=n.parent,c.schema.getBlockElements()[a.name]&&m()?(a.type=3,a.value=i,a.raw=!0,n.remove()):(n.type=3,n.value=i,n.raw=!0))}))})),(u=n).on("ResolveName",(function(e){"IMG"===e.target.nodeName&&u.dom.hasClass(e.target,r)&&(e.name="pagebreak")}))}))}(); -------------------------------------------------------------------------------- /public/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("preview",(function(e){var i,o;function a(){return o.execCommand("mcePreview")}(i=e).addCommand("mcePreview",(function(){var e,o;o=function(e){var i="",o=e.dom.encode,a=e.getParam("content_style","","string");i+='