├── .editorconfig
├── .env
├── .env.example
├── .gitattributes
├── .gitignore
├── .styleci.yml
├── README.md
├── app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Facades
│ └── AuthFacade.php
├── Helpers
│ └── functions.php
├── Http
│ ├── Controllers
│ │ ├── Admin
│ │ │ ├── AdminLogController.php
│ │ │ ├── AdminMenuController.php
│ │ │ ├── AdminRoleController.php
│ │ │ ├── AdminUserController.php
│ │ │ ├── AuthController.php
│ │ │ ├── BaseController.php
│ │ │ ├── DatabaseController.php
│ │ │ ├── EditorController.php
│ │ │ ├── IndexController.php
│ │ │ ├── SettingController.php
│ │ │ ├── SettingGroupController.php
│ │ │ ├── UserController.php
│ │ │ └── UserLevelController.php
│ │ └── Controller.php
│ ├── Kernel.php
│ ├── Middleware
│ │ ├── AdminAuth.php
│ │ ├── Authenticate.php
│ │ ├── CheckForMaintenanceMode.php
│ │ ├── EncryptCookies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
│ └── Model
│ │ ├── Admin
│ │ ├── AdminLog.php
│ │ ├── AdminLogData.php
│ │ ├── AdminMenu.php
│ │ ├── AdminRole.php
│ │ ├── AdminUser.php
│ │ └── BaseModel.php
│ │ └── Common
│ │ ├── Attachment.php
│ │ ├── BaseModel.php
│ │ ├── Setting.php
│ │ ├── SettingGroup.php
│ │ ├── User.php
│ │ └── UserLevel.php
├── Libs
│ ├── SystemInfo.php
│ └── UEditor.php
├── Providers
│ ├── AdminRepositoryServiceProvider.php
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Repositories
│ └── Admin
│ │ ├── Contracts
│ │ ├── AdminLogInterface.php
│ │ ├── AdminMenuInterface.php
│ │ ├── AdminRoleInterface.php
│ │ ├── AdminUserInterface.php
│ │ ├── AuthInterface.php
│ │ ├── SettingGroupInterface.php
│ │ ├── SettingInterface.php
│ │ ├── UserInterface.php
│ │ └── UserLevelInterface.php
│ │ └── Eloquent
│ │ ├── AdminLogRepository.php
│ │ ├── AdminMenuRepository.php
│ │ ├── AdminRoleRepository.php
│ │ ├── AdminUserRepository.php
│ │ ├── AuthRepository.php
│ │ ├── SettingGroupRepository.php
│ │ ├── SettingRepository.php
│ │ ├── UserLevelRepository.php
│ │ └── UserRepository.php
├── Services
│ ├── AdminBaseService.php
│ ├── AdminLogService.php
│ ├── AdminMenuService.php
│ ├── AdminRoleService.php
│ ├── AdminUserService.php
│ ├── AuthService.php
│ ├── DatabaseService.php
│ ├── EditorService.php
│ ├── IndexService.php
│ ├── SettingGroupService.php
│ ├── SettingService.php
│ ├── UserLevelService.php
│ └── UserService.php
├── Traits
│ └── Admin
│ │ ├── AdminTree.php
│ │ ├── PhpOffice.php
│ │ └── SettingForm.php
├── User.php
└── Validate
│ ├── Admin
│ ├── AdminMenuValidate.php
│ ├── AdminRoleValidate.php
│ └── AdminUserValidate.php
│ ├── BaseValidate.php
│ └── Common
│ ├── SettingGroupValidate.php
│ ├── SettingValidate.php
│ ├── UserLevelValidate.php
│ └── UserValidate.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── config
├── admin
│ ├── admin.php
│ ├── attachment.php
│ ├── template.php
│ └── ueditor.php
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── captcha.php
├── cors.php
├── database.php
├── filesystems.php
├── hashing.php
├── logging.php
├── mail.php
├── queue.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2020_05_19_150447_create_admin_log_table.php
│ ├── 2020_05_19_151328_create_admin_log_data_table.php
│ ├── 2020_05_19_151749_create_admin_menu_table.php
│ ├── 2020_05_19_152747_create_admin_role_table.php
│ ├── 2020_05_19_153253_create_admin_user_table.php
│ ├── 2020_05_19_154022_create_attachment_table.php
│ ├── 2020_05_19_155756_create_setting_table.php
│ ├── 2020_05_19_160452_create_setting_group_table.php
│ ├── 2020_05_19_161019_create_user_table.php
│ └── 2020_05_19_161818_create_user_level_table.php
└── seeds
│ ├── AdminMenuSeeder.php
│ ├── AdminRoleSeeder.php
│ ├── AdminUserSeeder.php
│ ├── DatabaseSeeder.php
│ ├── SettingGroupSeeder.php
│ ├── SettingSeeder.php
│ ├── UserLevelSeeder.php
│ └── UserSeeder.php
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── favicon.ico
├── index.php
├── robots.txt
├── static
│ ├── admin
│ │ ├── css
│ │ │ ├── AdminLTE.min.css
│ │ │ ├── _all-skins.min.css
│ │ │ ├── access.css
│ │ │ ├── admin.css
│ │ │ └── skins.css
│ │ ├── images
│ │ │ ├── avatar.png
│ │ │ ├── database.png
│ │ │ ├── default-background.jpg
│ │ │ ├── default_background.jpeg
│ │ │ ├── home.png
│ │ │ ├── login-default-bg.jpg
│ │ │ ├── menu.png
│ │ │ ├── qq_share_code.png
│ │ │ ├── role.png
│ │ │ ├── setting.png
│ │ │ ├── skin_setting.png
│ │ │ ├── user.png
│ │ │ ├── user_default.png
│ │ │ └── user_level_default.png
│ │ ├── js
│ │ │ ├── admin.js
│ │ │ ├── adminlte.min.js
│ │ │ ├── app.js
│ │ │ ├── demo.js
│ │ │ ├── html5shiv.min.js
│ │ │ ├── jquery.pjax.js
│ │ │ └── respond.min.js
│ │ └── plugins
│ │ │ ├── bootstrap-colorpicker
│ │ │ ├── css
│ │ │ │ └── bootstrap-colorpicker.min.css
│ │ │ ├── img
│ │ │ │ └── bootstrap-colorpicker
│ │ │ │ │ ├── alpha-horizontal.png
│ │ │ │ │ ├── alpha.png
│ │ │ │ │ ├── hue-horizontal.png
│ │ │ │ │ ├── hue.png
│ │ │ │ │ └── saturation.png
│ │ │ └── js
│ │ │ │ └── bootstrap-colorpicker.min.js
│ │ │ ├── bootstrap-number
│ │ │ └── bootstrap-number.min.js
│ │ │ ├── bootstrap-switch
│ │ │ ├── css
│ │ │ │ └── bootstrap-switch.min.css
│ │ │ └── js
│ │ │ │ └── bootstrap-switch.min.js
│ │ │ ├── bootstrap
│ │ │ ├── css
│ │ │ │ └── bootstrap.min.css
│ │ │ ├── fonts
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ └── js
│ │ │ │ └── bootstrap.min.js
│ │ │ ├── clipboard
│ │ │ └── clipboard.min.js
│ │ │ ├── fastclick
│ │ │ └── fastclick.min.js
│ │ │ ├── fileinput
│ │ │ ├── css
│ │ │ │ ├── fileinput-rtl.css
│ │ │ │ ├── fileinput-rtl.min.css
│ │ │ │ ├── fileinput.css
│ │ │ │ └── fileinput.min.css
│ │ │ ├── img
│ │ │ │ ├── loading-sm.gif
│ │ │ │ └── loading.gif
│ │ │ └── js
│ │ │ │ ├── fileinput.min.js
│ │ │ │ ├── locales
│ │ │ │ └── zh.min.js
│ │ │ │ └── plugins
│ │ │ │ ├── piexif.min.js
│ │ │ │ ├── purify.min.js
│ │ │ │ └── sortable.min.js
│ │ │ ├── font-awesome
│ │ │ ├── css
│ │ │ │ └── font-awesome.min.css
│ │ │ └── fonts
│ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ ├── fontawesome-webfont.woff
│ │ │ │ └── fontawesome-webfont.woff2
│ │ │ ├── gee-test
│ │ │ └── gee-test.min.js
│ │ │ ├── iconpicker
│ │ │ ├── css
│ │ │ │ └── iconpicker.min.css
│ │ │ └── js
│ │ │ │ └── iconpicker.min.js
│ │ │ ├── jquery-slimscroll
│ │ │ └── jquery.slimscroll.min.js
│ │ │ ├── jquery-ui
│ │ │ └── jquery-ui.min.js
│ │ │ ├── jquery-validation
│ │ │ ├── additional-methods.min.js
│ │ │ ├── jquery.validate.min.js
│ │ │ └── localization
│ │ │ │ └── messages_zh.min.js
│ │ │ ├── jquery
│ │ │ └── jquery.min.js
│ │ │ ├── js-cookie
│ │ │ └── js.cookie-2.2.0.min.js
│ │ │ ├── laydate
│ │ │ ├── laydate.js
│ │ │ └── theme
│ │ │ │ └── default
│ │ │ │ ├── font
│ │ │ │ ├── iconfont.eot
│ │ │ │ ├── iconfont.svg
│ │ │ │ ├── iconfont.ttf
│ │ │ │ └── iconfont.woff
│ │ │ │ └── laydate.css
│ │ │ ├── layer
│ │ │ ├── layer.js
│ │ │ ├── mobile
│ │ │ │ ├── layer.js
│ │ │ │ └── need
│ │ │ │ │ └── layer.css
│ │ │ └── theme
│ │ │ │ └── default
│ │ │ │ ├── icon-ext.png
│ │ │ │ ├── icon.png
│ │ │ │ ├── layer.css
│ │ │ │ ├── loading-0.gif
│ │ │ │ ├── loading-1.gif
│ │ │ │ └── loading-2.gif
│ │ │ ├── nprogress
│ │ │ ├── nprogress.css
│ │ │ └── nprogress.min.js
│ │ │ ├── select2
│ │ │ ├── css
│ │ │ │ └── select2.min.css
│ │ │ └── js
│ │ │ │ ├── i18n
│ │ │ │ ├── en.js
│ │ │ │ └── zh-CN.js
│ │ │ │ └── select2.full.min.js
│ │ │ ├── ueditor
│ │ │ ├── dialogs
│ │ │ │ ├── anchor
│ │ │ │ │ └── anchor.html
│ │ │ │ ├── attachment
│ │ │ │ │ ├── attachment.css
│ │ │ │ │ ├── attachment.html
│ │ │ │ │ ├── attachment.js
│ │ │ │ │ ├── fileTypeImages
│ │ │ │ │ │ ├── icon_chm.gif
│ │ │ │ │ │ ├── icon_default.png
│ │ │ │ │ │ ├── icon_doc.gif
│ │ │ │ │ │ ├── icon_exe.gif
│ │ │ │ │ │ ├── icon_jpg.gif
│ │ │ │ │ │ ├── icon_mp3.gif
│ │ │ │ │ │ ├── icon_mv.gif
│ │ │ │ │ │ ├── icon_pdf.gif
│ │ │ │ │ │ ├── icon_ppt.gif
│ │ │ │ │ │ ├── icon_psd.gif
│ │ │ │ │ │ ├── icon_rar.gif
│ │ │ │ │ │ ├── icon_txt.gif
│ │ │ │ │ │ └── icon_xls.gif
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── alignicon.gif
│ │ │ │ │ │ ├── alignicon.png
│ │ │ │ │ │ ├── bg.png
│ │ │ │ │ │ ├── file-icons.gif
│ │ │ │ │ │ ├── file-icons.png
│ │ │ │ │ │ ├── icons.gif
│ │ │ │ │ │ ├── icons.png
│ │ │ │ │ │ ├── image.png
│ │ │ │ │ │ ├── progress.png
│ │ │ │ │ │ ├── success.gif
│ │ │ │ │ │ └── success.png
│ │ │ │ ├── background
│ │ │ │ │ ├── background.css
│ │ │ │ │ ├── background.html
│ │ │ │ │ ├── background.js
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── bg.png
│ │ │ │ │ │ └── success.png
│ │ │ │ ├── charts
│ │ │ │ │ ├── chart.config.js
│ │ │ │ │ ├── charts.css
│ │ │ │ │ ├── charts.html
│ │ │ │ │ ├── charts.js
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── charts0.png
│ │ │ │ │ │ ├── charts1.png
│ │ │ │ │ │ ├── charts2.png
│ │ │ │ │ │ ├── charts3.png
│ │ │ │ │ │ ├── charts4.png
│ │ │ │ │ │ └── charts5.png
│ │ │ │ ├── emotion
│ │ │ │ │ ├── emotion.css
│ │ │ │ │ ├── emotion.html
│ │ │ │ │ ├── emotion.js
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── 0.gif
│ │ │ │ │ │ ├── bface.gif
│ │ │ │ │ │ ├── cface.gif
│ │ │ │ │ │ ├── fface.gif
│ │ │ │ │ │ ├── jxface2.gif
│ │ │ │ │ │ ├── neweditor-tab-bg.png
│ │ │ │ │ │ ├── tface.gif
│ │ │ │ │ │ ├── wface.gif
│ │ │ │ │ │ └── yface.gif
│ │ │ │ ├── gmap
│ │ │ │ │ └── gmap.html
│ │ │ │ ├── help
│ │ │ │ │ ├── help.css
│ │ │ │ │ ├── help.html
│ │ │ │ │ └── help.js
│ │ │ │ ├── image
│ │ │ │ │ ├── image.css
│ │ │ │ │ ├── image.html
│ │ │ │ │ ├── image.js
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── alignicon.jpg
│ │ │ │ │ │ ├── bg.png
│ │ │ │ │ │ ├── icons.gif
│ │ │ │ │ │ ├── icons.png
│ │ │ │ │ │ ├── image.png
│ │ │ │ │ │ ├── progress.png
│ │ │ │ │ │ ├── success.gif
│ │ │ │ │ │ └── success.png
│ │ │ │ ├── insertframe
│ │ │ │ │ └── insertframe.html
│ │ │ │ ├── internal.js
│ │ │ │ ├── link
│ │ │ │ │ └── link.html
│ │ │ │ ├── map
│ │ │ │ │ ├── map.html
│ │ │ │ │ └── show.html
│ │ │ │ ├── music
│ │ │ │ │ ├── music.css
│ │ │ │ │ ├── music.html
│ │ │ │ │ └── music.js
│ │ │ │ ├── preview
│ │ │ │ │ └── preview.html
│ │ │ │ ├── scrawl
│ │ │ │ │ ├── images
│ │ │ │ │ │ ├── addimg.png
│ │ │ │ │ │ ├── brush.png
│ │ │ │ │ │ ├── delimg.png
│ │ │ │ │ │ ├── delimgH.png
│ │ │ │ │ │ ├── empty.png
│ │ │ │ │ │ ├── emptyH.png
│ │ │ │ │ │ ├── eraser.png
│ │ │ │ │ │ ├── redo.png
│ │ │ │ │ │ ├── redoH.png
│ │ │ │ │ │ ├── scale.png
│ │ │ │ │ │ ├── scaleH.png
│ │ │ │ │ │ ├── size.png
│ │ │ │ │ │ ├── undo.png
│ │ │ │ │ │ └── undoH.png
│ │ │ │ │ ├── scrawl.css
│ │ │ │ │ ├── scrawl.html
│ │ │ │ │ └── scrawl.js
│ │ │ │ ├── searchreplace
│ │ │ │ │ ├── searchreplace.html
│ │ │ │ │ └── searchreplace.js
│ │ │ │ ├── snapscreen
│ │ │ │ │ └── snapscreen.html
│ │ │ │ ├── spechars
│ │ │ │ │ ├── spechars.html
│ │ │ │ │ └── spechars.js
│ │ │ │ ├── table
│ │ │ │ │ ├── dragicon.png
│ │ │ │ │ ├── edittable.css
│ │ │ │ │ ├── edittable.html
│ │ │ │ │ ├── edittable.js
│ │ │ │ │ ├── edittd.html
│ │ │ │ │ └── edittip.html
│ │ │ │ ├── template
│ │ │ │ │ ├── config.js
│ │ │ │ │ ├── images
│ │ │ │ │ │ ├── bg.gif
│ │ │ │ │ │ ├── pre0.png
│ │ │ │ │ │ ├── pre1.png
│ │ │ │ │ │ ├── pre2.png
│ │ │ │ │ │ ├── pre3.png
│ │ │ │ │ │ └── pre4.png
│ │ │ │ │ ├── template.css
│ │ │ │ │ ├── template.html
│ │ │ │ │ └── template.js
│ │ │ │ ├── video
│ │ │ │ │ ├── images
│ │ │ │ │ │ ├── bg.png
│ │ │ │ │ │ ├── center_focus.jpg
│ │ │ │ │ │ ├── file-icons.gif
│ │ │ │ │ │ ├── file-icons.png
│ │ │ │ │ │ ├── icons.gif
│ │ │ │ │ │ ├── icons.png
│ │ │ │ │ │ ├── image.png
│ │ │ │ │ │ ├── left_focus.jpg
│ │ │ │ │ │ ├── none_focus.jpg
│ │ │ │ │ │ ├── progress.png
│ │ │ │ │ │ ├── right_focus.jpg
│ │ │ │ │ │ ├── success.gif
│ │ │ │ │ │ └── success.png
│ │ │ │ │ ├── video.css
│ │ │ │ │ ├── video.html
│ │ │ │ │ └── video.js
│ │ │ │ └── wordimage
│ │ │ │ │ ├── fClipboard_ueditor.swf
│ │ │ │ │ ├── imageUploader.swf
│ │ │ │ │ ├── tangram.js
│ │ │ │ │ ├── wordimage.html
│ │ │ │ │ └── wordimage.js
│ │ │ ├── lang
│ │ │ │ ├── en
│ │ │ │ │ ├── en.min.js
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── addimage.png
│ │ │ │ │ │ ├── alldeletebtnhoverskin.png
│ │ │ │ │ │ ├── alldeletebtnupskin.png
│ │ │ │ │ │ ├── background.png
│ │ │ │ │ │ ├── button.png
│ │ │ │ │ │ ├── copy.png
│ │ │ │ │ │ ├── deletedisable.png
│ │ │ │ │ │ ├── deleteenable.png
│ │ │ │ │ │ ├── listbackground.png
│ │ │ │ │ │ ├── localimage.png
│ │ │ │ │ │ ├── music.png
│ │ │ │ │ │ ├── rotateleftdisable.png
│ │ │ │ │ │ ├── rotateleftenable.png
│ │ │ │ │ │ ├── rotaterightdisable.png
│ │ │ │ │ │ ├── rotaterightenable.png
│ │ │ │ │ │ └── upload.png
│ │ │ │ └── zh-cn
│ │ │ │ │ ├── images
│ │ │ │ │ ├── copy.png
│ │ │ │ │ ├── localimage.png
│ │ │ │ │ ├── music.png
│ │ │ │ │ └── upload.png
│ │ │ │ │ └── zh-cn.min.js
│ │ │ ├── themes
│ │ │ │ ├── default
│ │ │ │ │ ├── css
│ │ │ │ │ │ ├── ueditor.css
│ │ │ │ │ │ └── ueditor.min.css
│ │ │ │ │ ├── dialogbase.css
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── anchor.gif
│ │ │ │ │ │ ├── arrow.png
│ │ │ │ │ │ ├── arrow_down.png
│ │ │ │ │ │ ├── arrow_up.png
│ │ │ │ │ │ ├── button-bg.gif
│ │ │ │ │ │ ├── cancelbutton.gif
│ │ │ │ │ │ ├── charts.png
│ │ │ │ │ │ ├── cursor_h.gif
│ │ │ │ │ │ ├── cursor_h.png
│ │ │ │ │ │ ├── cursor_v.gif
│ │ │ │ │ │ ├── cursor_v.png
│ │ │ │ │ │ ├── dialog-title-bg.png
│ │ │ │ │ │ ├── filescan.png
│ │ │ │ │ │ ├── highlighted.gif
│ │ │ │ │ │ ├── icons-all.gif
│ │ │ │ │ │ ├── icons.gif
│ │ │ │ │ │ ├── icons.png
│ │ │ │ │ │ ├── loaderror.png
│ │ │ │ │ │ ├── loading.gif
│ │ │ │ │ │ ├── lock.gif
│ │ │ │ │ │ ├── neweditor-tab-bg.png
│ │ │ │ │ │ ├── pagebreak.gif
│ │ │ │ │ │ ├── scale.png
│ │ │ │ │ │ ├── sortable.png
│ │ │ │ │ │ ├── spacer.gif
│ │ │ │ │ │ ├── sparator_v.png
│ │ │ │ │ │ ├── table-cell-align.png
│ │ │ │ │ │ ├── tangram-colorpicker.png
│ │ │ │ │ │ ├── toolbar_bg.png
│ │ │ │ │ │ ├── unhighlighted.gif
│ │ │ │ │ │ ├── upload.png
│ │ │ │ │ │ ├── videologo.gif
│ │ │ │ │ │ ├── word.gif
│ │ │ │ │ │ └── wordpaste.png
│ │ │ │ └── iframe.css
│ │ │ ├── third-party
│ │ │ │ ├── SyntaxHighlighter
│ │ │ │ │ ├── shCore.js
│ │ │ │ │ └── shCoreDefault.css
│ │ │ │ ├── codemirror
│ │ │ │ │ ├── codemirror.css
│ │ │ │ │ └── codemirror.js
│ │ │ │ ├── highcharts
│ │ │ │ │ ├── adapters
│ │ │ │ │ │ ├── mootools-adapter.js
│ │ │ │ │ │ ├── mootools-adapter.src.js
│ │ │ │ │ │ ├── prototype-adapter.js
│ │ │ │ │ │ ├── prototype-adapter.src.js
│ │ │ │ │ │ ├── standalone-framework.js
│ │ │ │ │ │ └── standalone-framework.src.js
│ │ │ │ │ ├── highcharts-more.js
│ │ │ │ │ ├── highcharts.js
│ │ │ │ │ ├── modules
│ │ │ │ │ │ ├── annotations.js
│ │ │ │ │ │ ├── annotations.src.js
│ │ │ │ │ │ ├── canvas-tools.js
│ │ │ │ │ │ ├── canvas-tools.src.js
│ │ │ │ │ │ ├── data.js
│ │ │ │ │ │ ├── data.src.js
│ │ │ │ │ │ ├── drilldown.js
│ │ │ │ │ │ ├── drilldown.src.js
│ │ │ │ │ │ ├── exporting.js
│ │ │ │ │ │ ├── exporting.src.js
│ │ │ │ │ │ ├── funnel.js
│ │ │ │ │ │ ├── funnel.src.js
│ │ │ │ │ │ ├── heatmap.js
│ │ │ │ │ │ ├── heatmap.src.js
│ │ │ │ │ │ ├── map.js
│ │ │ │ │ │ ├── map.src.js
│ │ │ │ │ │ ├── no-data-to-display.js
│ │ │ │ │ │ └── no-data-to-display.src.js
│ │ │ │ │ └── themes
│ │ │ │ │ │ ├── dark-blue.js
│ │ │ │ │ │ ├── dark-green.js
│ │ │ │ │ │ ├── gray.js
│ │ │ │ │ │ ├── grid.js
│ │ │ │ │ │ └── skies.js
│ │ │ │ ├── jquery-1.10.2.min.js
│ │ │ │ ├── video-js
│ │ │ │ │ ├── font
│ │ │ │ │ │ ├── vjs.eot
│ │ │ │ │ │ ├── vjs.svg
│ │ │ │ │ │ ├── vjs.ttf
│ │ │ │ │ │ └── vjs.woff
│ │ │ │ │ ├── video-js.css
│ │ │ │ │ ├── video-js.min.css
│ │ │ │ │ ├── video-js.swf
│ │ │ │ │ └── video.js
│ │ │ │ ├── webuploader
│ │ │ │ │ ├── Uploader.swf
│ │ │ │ │ ├── webuploader.css
│ │ │ │ │ ├── webuploader.custom.min.js
│ │ │ │ │ ├── webuploader.flashonly.min.js
│ │ │ │ │ ├── webuploader.html5only.min.js
│ │ │ │ │ ├── webuploader.min.js
│ │ │ │ │ └── webuploader.withoutimage.min.js
│ │ │ │ ├── xss.min.js
│ │ │ │ └── zeroclipboard
│ │ │ │ │ ├── ZeroClipboard.min.js
│ │ │ │ │ └── ZeroClipboard.swf
│ │ │ ├── ueditor.all.min.js
│ │ │ ├── ueditor.config.js
│ │ │ └── ueditor.parse.min.js
│ │ │ └── viewer
│ │ │ ├── jquery-viewer.min.js
│ │ │ ├── viewer.min.css
│ │ │ └── viewer.min.js
│ └── css
│ │ └── fonts.googleapis.com.css
└── web.config
├── resources
├── js
│ ├── app.js
│ └── bootstrap.js
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
├── sass
│ └── app.scss
└── views
│ ├── admin
│ ├── admin_log
│ │ ├── index.blade.php
│ │ └── view.blade.php
│ ├── admin_menu
│ │ ├── add.blade.php
│ │ ├── edit.blade.php
│ │ └── index.blade.php
│ ├── admin_role
│ │ ├── access.blade.php
│ │ ├── add.blade.php
│ │ ├── edit.blade.php
│ │ └── index.blade.php
│ ├── admin_user
│ │ ├── add.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── profile.blade.php
│ ├── auth
│ │ ├── captcha.blade.php
│ │ └── login.blade.php
│ ├── database
│ │ ├── table.blade.php
│ │ └── view.blade.php
│ ├── index
│ │ └── index.blade.php
│ ├── public
│ │ ├── base.blade.php
│ │ ├── content_header.blade.php
│ │ ├── control_sidebar.blade.php
│ │ ├── footer.blade.php
│ │ ├── head_css.blade.php
│ │ ├── head_js.blade.php
│ │ ├── header.blade.php
│ │ ├── layer_base.blade.php
│ │ └── sidebar.blade.php
│ ├── setting
│ │ ├── add.blade.php
│ │ ├── all.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── setting_group
│ │ ├── add.blade.php
│ │ ├── edit.blade.php
│ │ └── index.blade.php
│ ├── template
│ │ ├── 404.blade.php
│ │ ├── 500.blade.php
│ │ ├── content.blade.php
│ │ └── layer_content.blade.php
│ ├── test
│ │ └── index.blade.php
│ ├── user
│ │ ├── add.blade.php
│ │ ├── edit.blade.php
│ │ └── index.blade.php
│ └── user_level
│ │ ├── add.blade.php
│ │ ├── edit.blade.php
│ │ └── index.blade.php
│ └── welcome.blade.php
├── routes
├── admin.php
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ ├── .gitignore
│ │ └── data
│ │ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tests
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
└── webpack.mix.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=base64:OKA6BfEtJUWqzKLioId4cmgbvp43oSmW9y/27AUIFI4=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=mysql56
11 | DB_PORT=3306
12 | DB_DATABASE=laravel-admin-2.0
13 | DB_USERNAME=www
14 | DB_PASSWORD=yuxingfei
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=file
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_MAILER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 | MAIL_FROM_ADDRESS=null
33 | MAIL_FROM_NAME="${APP_NAME}"
34 |
35 | AWS_ACCESS_KEY_ID=
36 | AWS_SECRET_ACCESS_KEY=
37 | AWS_DEFAULT_REGION=us-east-1
38 | AWS_BUCKET=
39 |
40 | PUSHER_APP_ID=
41 | PUSHER_APP_KEY=
42 | PUSHER_APP_SECRET=
43 | PUSHER_APP_CLUSTER=mt1
44 |
45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
47 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=laravel
13 | DB_USERNAME=root
14 | DB_PASSWORD=
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=file
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_MAILER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 | MAIL_FROM_ADDRESS=null
33 | MAIL_FROM_NAME="${APP_NAME}"
34 |
35 | AWS_ACCESS_KEY_ID=
36 | AWS_SECRET_ACCESS_KEY=
37 | AWS_DEFAULT_REGION=us-east-1
38 | AWS_BUCKET=
39 |
40 | PUSHER_APP_ID=
41 | PUSHER_APP_KEY=
42 | PUSHER_APP_SECRET=
43 | PUSHER_APP_CLUSTER=mt1
44 |
45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
47 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | .env
7 | .env.backup
8 | .phpunit.result.cache
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 | .idea
14 |
--------------------------------------------------------------------------------
/.styleci.yml:
--------------------------------------------------------------------------------
1 | php:
2 | preset: laravel
3 | disabled:
4 | - unused_use
5 | finder:
6 | not-name:
7 | - index.php
8 | - server.php
9 | js:
10 | finder:
11 | not-name:
12 | - webpack.mix.js
13 | css: true
14 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')->hourly();
28 | }
29 |
30 | /**
31 | * Register the commands for the application.
32 | *
33 | * @return void
34 | */
35 | protected function commands()
36 | {
37 | $this->load(__DIR__.'/Commands');
38 |
39 | require base_path('routes/console.php');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/5
7 | * Time: 17:15
8 | */
9 |
10 | namespace App\Facades;
11 |
12 |
13 | use App\Repositories\Admin\Contracts\AuthInterface;
14 | use Illuminate\Support\Facades\Facade;
15 |
16 | class AuthFacade extends Facade
17 | {
18 | protected static function getFacadeAccessor(){
19 | return AuthInterface::class;
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/AdminLogController.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/17
7 | * Time: 15:19
8 | */
9 |
10 | namespace App\Http\Controllers\Admin;
11 |
12 | use App\Services\AdminLogService;
13 |
14 | class AdminLogController extends BaseController
15 | {
16 | /**
17 | * 操作日志服务
18 | *
19 | * @var AdminLogService
20 | */
21 | protected $adminLogService;
22 |
23 | /**
24 | * AdminLogController 构造函数.
25 | *
26 | * @param AdminLogService $adminLogService
27 | * @throws \Illuminate\Contracts\Container\BindingResolutionException
28 | */
29 | public function __construct(AdminLogService $adminLogService)
30 | {
31 | parent::__construct();
32 |
33 | $this->adminLogService = $adminLogService;
34 | }
35 |
36 | /**
37 | * 操作日志首页
38 | *
39 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
40 | * Author: Stephen
41 | * Date: 2020/7/24 15:06:58
42 | */
43 | public function index()
44 | {
45 | $data = $this->adminLogService->getPageData();
46 |
47 | return view('admin.admin_log.index',$data);
48 | }
49 |
50 | /**
51 | * 日志查看
52 | *
53 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
54 | * Author: Stephen
55 | * Date: 2020/7/24 15:07:14
56 | */
57 | public function view()
58 | {
59 | $data = $this->adminLogService->getItemAdminLog();
60 |
61 | return view('admin.admin_log.view',['data' => $data]);
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/EditorController.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Http\Controllers\Admin;
9 |
10 | use App\Services\EditorService;
11 |
12 | class EditorController extends BaseController
13 | {
14 |
15 | /**
16 | * @var EditorService 编辑器 服务
17 | */
18 | protected $editorService;
19 |
20 | /**
21 | * EditorController 构造函数.
22 | *
23 | * @param EditorService $editorService
24 | * @throws \Illuminate\Contracts\Container\BindingResolutionException
25 | */
26 | public function __construct(EditorService $editorService)
27 | {
28 | parent::__construct();
29 |
30 | $this->editorService = $editorService;
31 | }
32 |
33 | /**
34 | * 编辑器上传等url
35 | *
36 | * @return \Illuminate\Http\JsonResponse|string
37 | * Author: Stephen
38 | * Date: 2020/7/24 16:11:56
39 | */
40 | public function server()
41 | {
42 | return $this->editorService->server();
43 | }
44 | }
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/IndexController.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 | namespace App\Http\Controllers\Admin;
8 |
9 | use App\Services\IndexService;
10 |
11 | class IndexController extends BaseController
12 | {
13 | /**
14 | * @var IndexService 首页服务
15 | */
16 | private $indexService;
17 |
18 | /**
19 | * IndexController 构造函数.
20 | *
21 | * @param IndexService $indexService
22 | * @throws \Illuminate\Contracts\Container\BindingResolutionException
23 | */
24 | public function __construct(IndexService $indexService)
25 | {
26 | parent::__construct();
27 |
28 | $this->indexService = $indexService;
29 | }
30 |
31 | /**
32 | * 首页
33 | *
34 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
35 | * Author: Stephen
36 | * Date: 2020/7/24 16:12:34
37 | */
38 | public function index()
39 | {
40 | $info = $this->indexService->getInfo();
41 |
42 | return view('admin.index.index',$info);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | route()->getName();
33 |
34 | //验证权限
35 | if (!in_array($url, $this->authExcept, true))
36 | {
37 | //验证是否登录
38 | $isLogin = AuthFacade::isLogin();
39 |
40 | if (!$isLogin) {
41 | error('未登录', 'admin.auth.login');
42 | }
43 |
44 | $loginUser = session(LOGIN_USER);
45 |
46 | //登录后,验证有无权限
47 | if ($loginUser['id'] !== 1 && !$this->authCheck($url,$loginUser)) {
48 | error('无权限', $request->isMethod('get') ? null : URL_CURRENT);
49 | }
50 |
51 | }
52 |
53 | if ((int)$request->input('check_auth') === 1) {
54 | success();
55 | }
56 |
57 | return $next($request);
58 | }
59 |
60 | /**
61 | * 权限检查
62 | *
63 | * @param $url
64 | * @param $loginUser
65 | * @return bool
66 | * Author: Stephen
67 | * Date: 2020/6/8 14:39:08
68 | */
69 | public function authCheck($url,$loginUser)
70 | {
71 | return in_array($url, $this->authExcept, true) || in_array($url, $loginUser['auth_route_name'], true);
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/CheckForMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | check()) {
22 | return redirect(RouteServiceProvider::HOME);
23 | }
24 |
25 | return $next($request);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Http\Model\Admin;
9 |
10 | use Illuminate\Database\Eloquent\Relations\BelongsTo;
11 | use Illuminate\Support\Facades\Crypt;
12 |
13 | class AdminLogData extends BaseModel
14 | {
15 | /**
16 | * 与模型关联的表名
17 | *
18 | * @var string
19 | */
20 | protected $table = 'admin_log_data';
21 |
22 | /**
23 | * 重定义主键
24 | *
25 | * @var string
26 | */
27 | protected $primaryKey = 'id';
28 |
29 | /**
30 | * 指示是否自动维护时间戳
31 | *
32 | * @var bool
33 | */
34 | public $timestamps = false;
35 |
36 | /**
37 | * 可以被批量赋值的属性。
38 | *
39 | * @var array
40 | */
41 | protected $fillable = ['data'];
42 |
43 | /**
44 | * 关联log
45 | *
46 | * @return BelongsTo
47 | * Author: Stephen
48 | * Date: 2020/5/18 16:50
49 | */
50 | public function adminLog(): BelongsTo
51 | {
52 | return $this->belongsTo(AdminLog::class,'admin_log_id','id');
53 | }
54 |
55 | /**
56 | * 获取data
57 | *
58 | * @param $value
59 | * @return false|string
60 | * Author: Stephen
61 | * Date: 2020/5/18 16:50
62 | */
63 | public function getDataAttribute($value)
64 | {
65 | $data = Crypt::decrypt($value, env('APP_KEY'));
66 | return json_encode(json_decode($data, true), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/app/Http/Model/Admin/AdminMenu.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Http\Model\Admin;
9 |
10 | class AdminMenu extends BaseModel
11 | {
12 | /**
13 | * 与模型关联的表名
14 | *
15 | * @var string
16 | */
17 | protected $table = 'admin_menu';
18 |
19 | /**
20 | * 重定义主键
21 | *
22 | * @var string
23 | */
24 | protected $primaryKey = 'id';
25 |
26 | /**
27 | * 指示是否自动维护时间戳
28 | *
29 | * @var bool
30 | */
31 | public $timestamps = false;
32 |
33 | /**
34 | * 不可批量赋值的属性。
35 | *
36 | * @var array
37 | */
38 | protected $guarded = ['is_more','more_name'];
39 |
40 |
41 | public $logMethod = [
42 | 0 => '不记录',
43 | 1 => 'GET',
44 | 2 => 'POST',
45 | 3 => 'PUT',
46 | 4 => 'DELETE'
47 | ];
48 |
49 | /**
50 | * @var array 不允许删除的id
51 | */
52 | public $noDeletionId = [
53 | 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
54 | ];
55 |
56 | /**
57 | * 事件
58 | *
59 | * Author: Stephen
60 | * Date: user_define_date
61 | */
62 | protected static function booted()
63 | {
64 | //添加首页,菜单管理,添加菜单
65 | static::creating(function ($admin_menu) {
66 | //url验重
67 | if(self::where('url',$admin_menu->url)->count() > 0){
68 | error('该url已存在');
69 | }
70 | //route_name验重
71 | if(self::where('route_name',$admin_menu->route_name)->count() > 0){
72 | error('该route_name已存在');
73 | }
74 | });
75 | }
76 |
77 |
78 | }
--------------------------------------------------------------------------------
/app/Http/Model/Admin/AdminRole.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Http\Model\Admin;
9 |
10 | class AdminRole extends BaseModel
11 | {
12 | /**
13 | * 与模型关联的表名
14 | *
15 | * @var string
16 | */
17 | protected $table = 'admin_role';
18 |
19 | /**
20 | * 重定义主键
21 | *
22 | * @var string
23 | */
24 | protected $primaryKey = 'id';
25 |
26 | /**
27 | * 指示是否自动维护时间戳
28 | *
29 | * @var bool
30 | */
31 | public $timestamps = false;
32 |
33 | /**
34 | * 不可批量赋值的属性。
35 | *
36 | * @var array
37 | */
38 | protected $guarded = [];
39 |
40 |
41 | protected $searchField = [
42 | 'name',
43 | 'description'
44 | ];
45 |
46 | public $noDeletionId = [
47 | 1
48 | ];
49 |
50 | /**
51 | * 事件
52 | *
53 | * Author: Stephen
54 | * Date: 2020/5/18 16:51
55 | */
56 | protected static function booted()
57 | {
58 | //添加首页,系统管理,个人资料菜单/权限
59 | static::creating(function ($user) {
60 | //名称验重
61 | if(AdminRole::where('name',$user->name)->count() > 0){
62 | error('该名称已存在');
63 | }
64 | $user->url = [1, 2, 18];
65 | });
66 | }
67 |
68 | /**
69 | * 获取url
70 | *
71 | * @param $value
72 | * @return array
73 | * Author: Stephen
74 | * Date: 2020/5/18 16:51
75 | */
76 | protected function getUrlAttribute($value)
77 | {
78 | return $value !== '' ? explode(',', $value) : [];
79 | }
80 |
81 | /**
82 | * 设置url
83 | *
84 | * @param $value
85 | * Author: Stephen
86 | * Date: 2020/5/18 16:52
87 | */
88 | protected function setUrlAttribute($value)
89 | {
90 | $this->attributes['url'] = $value !== '' ? implode(',', $value) : '';
91 | }
92 |
93 | }
94 |
--------------------------------------------------------------------------------
/app/Http/Model/Common/SettingGroup.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Http\Model\Common;
9 |
10 | class SettingGroup extends BaseModel
11 | {
12 | const CREATED_AT = 'create_time';
13 | const UPDATED_AT = 'update_time';
14 |
15 | /**
16 | * 与模型关联的表名
17 | *
18 | * @var string
19 | */
20 | protected $table = 'setting_group';
21 |
22 | /**
23 | * 重定义主键
24 | *
25 | * @var string
26 | */
27 | protected $primaryKey = 'id';
28 |
29 | /**
30 | * 指示是否自动维护时间戳
31 | *
32 | * @var bool
33 | */
34 | public $timestamps = true;
35 |
36 | /**
37 | * The storage format of the model's date columns.
38 | *
39 | * @var string
40 | */
41 | protected $dateFormat = 'U';
42 |
43 | /**
44 | * 不可批量赋值的属性。
45 | *
46 | * @var array
47 | */
48 | protected $guarded = [];
49 |
50 |
51 | public $noDeletionId =[
52 | 1,2,3,4,5,
53 | ];
54 |
55 | //可搜索字段
56 | protected $searchField = ['name', 'description', 'code',];
57 |
58 | /**
59 | * 模型事件
60 | *
61 | * Author: Stephen
62 | * Date: 2020/5/18 16:58
63 | */
64 | protected static function booted()
65 | {
66 | //添加首页,系统管理,个人资料菜单/权限
67 | static::creating(function ($settingGroup) {
68 | //名称验重
69 | if(SettingGroup::where('code',$settingGroup->code)->count() > 0){
70 | error('code已存在');
71 | }
72 | });
73 | }
74 |
75 | /**
76 | * 关联设置
77 | *
78 | * @return \Illuminate\Database\Eloquent\Relations\HasMany
79 | * Author: Stephen
80 | * Date: 2020/5/18 16:58
81 | */
82 | public function setting()
83 | {
84 | return $this->hasMany(Setting::class);
85 | }
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/app/Http/Model/Common/UserLevel.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Http\Model\Common;
9 |
10 | class UserLevel extends BaseModel
11 | {
12 | const CREATED_AT = 'create_time';
13 | const UPDATED_AT = 'update_time';
14 |
15 | /**
16 | * 与模型关联的表名
17 | *
18 | * @var string
19 | */
20 | protected $table = 'user_level';
21 |
22 | /**
23 | * 重定义主键
24 | *
25 | * @var string
26 | */
27 | protected $primaryKey = 'id';
28 |
29 | /**
30 | * 指示是否自动维护时间戳
31 | *
32 | * @var bool
33 | */
34 | public $timestamps = true;
35 |
36 | /**
37 | * The storage format of the model's date columns.
38 | *
39 | * @var string
40 | */
41 | protected $dateFormat = 'U';
42 |
43 | /**
44 | * 不可批量赋值的属性。
45 | *
46 | * @var array
47 | */
48 | protected $guarded = [];
49 |
50 | /**
51 | * @var array 可搜索字段
52 | */
53 | protected $searchField = ['name', 'description',];
54 |
55 | /**
56 | * 关联用户
57 | *
58 | * @return \Illuminate\Database\Eloquent\Relations\HasMany
59 | * Author: Stephen
60 | * Date: 2020/5/18 17:00
61 | */
62 | public function user()
63 | {
64 | return $this->hasMany(User::class);
65 | }
66 |
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | *
26 | * @return void
27 | */
28 | public function boot()
29 | {
30 | parent::boot();
31 |
32 | //
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Repositories/Admin/Contracts/AdminLogInterface.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/17
7 | * Time: 15:23
8 | */
9 |
10 | namespace App\Repositories\Admin\Contracts;
11 |
12 |
13 | interface AdminLogInterface
14 | {
15 | /**
16 | * 首页查询
17 | *
18 | * @param $param
19 | * @param $perPage
20 | * @return mixed
21 | * Author: Stephen
22 | * Date: 2020/7/27 15:29:56
23 | */
24 | public function getPageData($param,$perPage);
25 |
26 | /**
27 | * 通过id查找日志记录
28 | *
29 | * @param $id
30 | * @return mixed
31 | * Author: Stephen
32 | * Date: 2020/7/27 15:30:10
33 | */
34 | public function find($id);
35 |
36 | }
--------------------------------------------------------------------------------
/app/Repositories/Admin/Contracts/AuthInterface.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/5
7 | * Time: 17:01
8 | */
9 |
10 | namespace App\Repositories\Admin\Contracts;
11 |
12 | interface AuthInterface
13 | {
14 | /**
15 | * 是否登录
16 | *
17 | * @return mixed
18 | * Author: Stephen
19 | * Date: 2020/7/27 15:50:57
20 | */
21 | public function isLogin();
22 |
23 | /**
24 | * 登录校验
25 | *
26 | * @param array $param
27 | * @return mixed
28 | * Author: Stephen
29 | * Date: 2020/7/27 15:51:37
30 | */
31 | public function checkLogin(array $param);
32 |
33 | /**
34 | * 登录日志
35 | *
36 | * @param $loginUserId
37 | * Author: Stephen
38 | * Date: 2020/7/27 15:52:59
39 | */
40 | public function loginLog($loginUserId) :void ;
41 |
42 | /**
43 | * 后台操作日志数据
44 | *
45 | * @param $url
46 | * @param $loginUser
47 | * @param $menu
48 | * Author: Stephen
49 | * Date: 2020/7/27 15:53:11
50 | */
51 | public function adminLog($url,$loginUser,$menu) :void ;
52 |
53 | }
--------------------------------------------------------------------------------
/app/Repositories/Admin/Contracts/SettingGroupInterface.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/7/23
7 | * Time: 16:25
8 | */
9 |
10 | namespace App\Repositories\Admin\Contracts;
11 |
12 |
13 | interface SettingGroupInterface
14 | {
15 | /**
16 | * 通过id查找数据
17 | *
18 | * @param $id
19 | * @return mixed
20 | * Author: Stephen
21 | * Date: 2020/7/27 16:14:31
22 | */
23 | public function findById($id);
24 |
25 | /**
26 | * 首页数据查询
27 | *
28 | * @param $param
29 | * @param $perPage
30 | * @return mixed
31 | * Author: Stephen
32 | * Date: 2020/7/27 16:14:51
33 | */
34 | public function getPageDataForAll($param,$perPage);
35 |
36 | /**
37 | * 获取所有的设置分组
38 | *
39 | * @return mixed
40 | * Author: Stephen
41 | * Date: 2020/7/27 16:15:13
42 | */
43 | public function getSettingGroupList();
44 |
45 | /**
46 | * 创建设置分组
47 | *
48 | * @param $param
49 | * @return mixed
50 | * Author: Stephen
51 | * Date: 2020/7/27 16:15:30
52 | */
53 | public function create($param);
54 |
55 | /**
56 | * 根据id删除设置分组
57 | *
58 | * @param $id
59 | * @return mixed
60 | * Author: Stephen
61 | * Date: 2020/7/27 16:15:42
62 | */
63 | public function destroy($id);
64 |
65 | }
--------------------------------------------------------------------------------
/app/Repositories/Admin/Contracts/SettingInterface.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/7/23
7 | * Time: 16:25
8 | */
9 |
10 | namespace App\Repositories\Admin\Contracts;
11 |
12 |
13 | interface SettingInterface
14 | {
15 | /**
16 | * 设置界面首页数据查询
17 | *
18 | * @param $param
19 | * @param $perPage
20 | * @return mixed
21 | * Author: Stephen
22 | * Date: 2020/7/27 16:16:00
23 | */
24 | public function getPageData($param,$perPage);
25 |
26 | /**
27 | * 根据设置分组id获取多个设置信息
28 | *
29 | * @param $settingGroupId
30 | * @return mixed
31 | * Author: Stephen
32 | * Date: 2020/7/27 16:16:36
33 | */
34 | public function getDataBySettingGroupId($settingGroupId);
35 |
36 | /**
37 | * 根据id查找设置信息
38 | *
39 | * @param $id
40 | * @return mixed
41 | * Author: Stephen
42 | * Date: 2020/7/27 16:17:20
43 | */
44 | public function findById($id);
45 |
46 | /**
47 | * 创建设置数据
48 | *
49 | * @param $param
50 | * @return mixed
51 | * Author: Stephen
52 | * Date: 2020/7/27 16:17:45
53 | */
54 | public function create($param);
55 |
56 | /**
57 | * 删除设置数据
58 | *
59 | * @param $id
60 | * @return mixed
61 | * Author: Stephen
62 | * Date: 2020/7/27 16:17:56
63 | */
64 | public function destroy($id);
65 |
66 | }
--------------------------------------------------------------------------------
/app/Repositories/Admin/Contracts/UserInterface.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/17
7 | * Time: 15:23
8 | */
9 |
10 | namespace App\Repositories\Admin\Contracts;
11 |
12 |
13 | interface UserInterface
14 | {
15 | /**
16 | * 用户管理首页
17 | *
18 | * @param $param
19 | * @param $perPage
20 | * @return mixed
21 | * Author: Stephen
22 | * Date: 2020/7/27 16:18:22
23 | */
24 | public function getPageData($param,$perPage);
25 |
26 | /**
27 | * 根据条件获取用户
28 | *
29 | * @param $param
30 | * @return mixed
31 | * Author: Stephen
32 | * Date: 2020/7/27 16:18:54
33 | */
34 | public function get($param);
35 |
36 | /**
37 | * 创建用户
38 | *
39 | * @param $param
40 | * @return mixed
41 | * Author: Stephen
42 | * Date: 2020/7/27 16:19:09
43 | */
44 | public function create($param);
45 |
46 | /**
47 | * 根据id查找用户信息
48 | *
49 | * @param $id
50 | * @return mixed
51 | * Author: Stephen
52 | * Date: 2020/7/27 16:19:21
53 | */
54 | public function findById($id);
55 |
56 | /**
57 | * 修改用户信息
58 | *
59 | * @param $param
60 | * @return mixed
61 | * Author: Stephen
62 | * Date: 2020/7/27 16:19:50
63 | */
64 | public function update($param);
65 |
66 | /**
67 | * 启用
68 | *
69 | * @param $id
70 | * @return mixed
71 | * Author: Stephen
72 | * Date: 2020/7/27 16:20:07
73 | */
74 | public function enable($id);
75 |
76 | /**
77 | * 禁用用户
78 | *
79 | * @param $id
80 | * @return mixed
81 | * Author: Stephen
82 | * Date: 2020/7/27 16:20:15
83 | */
84 | public function disable($id);
85 |
86 | /**
87 | * 删除用户
88 | *
89 | * @param $id
90 | * @return mixed
91 | * Author: Stephen
92 | * Date: 2020/7/27 16:20:23
93 | */
94 | public function destroy($id);
95 |
96 | }
--------------------------------------------------------------------------------
/app/Repositories/Admin/Contracts/UserLevelInterface.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/17
7 | * Time: 15:23
8 | */
9 |
10 | namespace App\Repositories\Admin\Contracts;
11 |
12 |
13 | interface UserLevelInterface
14 | {
15 |
16 | /**
17 | * 根据条件获取用户等级
18 | *
19 | * @param $param
20 | * @return mixed
21 | * Author: Stephen
22 | * Date: 2020/7/27 16:20:49
23 | */
24 | public function get($param);
25 |
26 | /**
27 | * 用户等级首页查询
28 | *
29 | * @param $param
30 | * @param $perPage
31 | * @return mixed
32 | * Author: Stephen
33 | * Date: 2020/7/27 16:21:05
34 | */
35 | public function getPageData($param,$perPage);
36 |
37 | /**
38 | * 创建用户等级
39 | *
40 | * @param $param
41 | * @return mixed
42 | * Author: Stephen
43 | * Date: 2020/7/27 16:21:21
44 | */
45 | public function create($param);
46 |
47 | /**
48 | * 根据id查找用户等级信息
49 | *
50 | * @param $id
51 | * @return mixed
52 | * Author: Stephen
53 | * Date: 2020/7/27 16:21:32
54 | */
55 | public function findById($id);
56 |
57 | /**
58 | * 更新用户等级
59 | *
60 | * @param $param
61 | * @return mixed
62 | * Author: Stephen
63 | * Date: 2020/7/27 16:22:05
64 | */
65 | public function update($param);
66 |
67 | /**
68 | * 启用
69 | *
70 | * @param $id
71 | * @return mixed
72 | * Author: Stephen
73 | * Date: 2020/7/27 16:22:16
74 | */
75 | public function enable($id);
76 |
77 | /**
78 | * 禁用
79 | *
80 | * @param $id
81 | * @return mixed
82 | * Author: Stephen
83 | * Date: 2020/7/27 16:22:25
84 | */
85 | public function disable($id);
86 |
87 | /**
88 | * 删除用户等级
89 | *
90 | * @param $id
91 | * @return mixed
92 | * Author: Stephen
93 | * Date: 2020/7/27 16:22:34
94 | */
95 | public function destroy($id);
96 |
97 | }
--------------------------------------------------------------------------------
/app/Repositories/Admin/Eloquent/AdminLogRepository.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/5
7 | * Time: 17:03
8 | */
9 |
10 | namespace App\Repositories\Admin\Eloquent;
11 |
12 | use App\Http\Model\Admin\AdminLog;
13 | use App\Repositories\Admin\Contracts\AdminLogInterface;
14 |
15 | class AdminLogRepository implements AdminLogInterface
16 | {
17 |
18 | /**
19 | * 首页查询
20 | *
21 | * @param $param
22 | * @param $perPage
23 | * @return mixed
24 | * Author: Stephen
25 | * Date: 2020/7/27 16:24:06
26 | */
27 | public function getPageData($param, $perPage)
28 | {
29 | return AdminLog::addWhere($param)->paginate($perPage);
30 | }
31 |
32 | /**
33 | * 通过id查找日志记录
34 | *
35 | * @param $id
36 | * @return mixed
37 | * Author: Stephen
38 | * Date: 2020/7/27 16:24:13
39 | */
40 | public function find($id)
41 | {
42 | return AdminLog::find($id);
43 | }
44 |
45 |
46 | }
--------------------------------------------------------------------------------
/app/Repositories/Admin/Eloquent/SettingGroupRepository.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/5
7 | * Time: 17:03
8 | */
9 |
10 | namespace App\Repositories\Admin\Eloquent;
11 |
12 | use App\Http\Model\Common\SettingGroup;
13 | use App\Repositories\Admin\Contracts\SettingGroupInterface;
14 |
15 | class SettingGroupRepository implements SettingGroupInterface
16 | {
17 | /**
18 | * 通过id查找数据
19 | *
20 | * @param $id
21 | * @return mixed
22 | * Author: Stephen
23 | * Date: 2020/7/27 16:36:03
24 | */
25 | public function findById($id)
26 | {
27 | return SettingGroup::find($id);
28 | }
29 |
30 | /**
31 | * 首页数据查询
32 | *
33 | * @param $param
34 | * @param $perPage
35 | * @return mixed
36 | * Author: Stephen
37 | * Date: 2020/7/27 16:36:09
38 | */
39 | public function getPageDataForAll($param, $perPage)
40 | {
41 | return SettingGroup::addWhere($param)->paginate($perPage);
42 | }
43 |
44 | /**
45 | * 获取所有的设置分组
46 | *
47 | * @return SettingGroup[]|\Illuminate\Database\Eloquent\Collection|mixed
48 | * Author: Stephen
49 | * Date: 2020/7/27 16:36:20
50 | */
51 | public function getSettingGroupList()
52 | {
53 | return SettingGroup::all();
54 | }
55 |
56 | /**
57 | * 创建设置分组
58 | *
59 | * @param $param
60 | * @return mixed
61 | * Author: Stephen
62 | * Date: 2020/7/27 16:36:33
63 | */
64 | public function create($param)
65 | {
66 | return SettingGroup::create($param);
67 | }
68 |
69 | /**
70 | * 根据id删除设置分组
71 | *
72 | * @param $id
73 | * @return int|mixed
74 | * Author: Stephen
75 | * Date: 2020/7/27 16:36:44
76 | */
77 | public function destroy($id)
78 | {
79 | return SettingGroup::destroy($id);
80 | }
81 |
82 |
83 | }
--------------------------------------------------------------------------------
/app/Services/AdminBaseService.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/12
7 | * Time: 14:17
8 | */
9 |
10 | namespace App\Services;
11 |
12 |
13 | use Illuminate\Support\Facades\Cookie;
14 |
15 | class AdminBaseService
16 | {
17 | /**
18 | * 每页显示多少条
19 | *
20 | * @return array|int|string|null
21 | * Author: Stephen
22 | * Date: 2020/7/27 16:53:12
23 | */
24 | public function perPage()
25 | {
26 | $perPage = Cookie::get('admin_per_page') ?? 10;
27 |
28 | return $perPage < 100 ? $perPage : 100;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/app/Services/EditorService.php:
--------------------------------------------------------------------------------
1 |
6 | * Date: 2020/6/17
7 | * Time: 17:00
8 | */
9 |
10 | namespace App\Services;
11 |
12 | use App\Libs\UEditor;
13 | use Illuminate\Http\Request;
14 |
15 | class EditorService
16 | {
17 | /**
18 | * @var Request 框架request对象
19 | */
20 | protected $request;
21 |
22 | /**
23 | * EditorService 构造函数.
24 | *
25 | * @param Request $request
26 | */
27 | public function __construct(Request $request)
28 | {
29 | $this->request = $request;
30 | }
31 |
32 | /**
33 | * ueditor的服务处理
34 | *
35 | * @return \Illuminate\Http\JsonResponse|string
36 | * Author: Stephen
37 | * Date: 2020/7/28 10:23:26
38 | */
39 | public function server()
40 | {
41 | $param = $this->request->input();
42 |
43 | $config = config('admin.ueditor');
44 | $action = $param['action'];
45 | $editor = new UEditor($config);
46 |
47 | return $editor->server($action);
48 | }
49 |
50 | }
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | 'datetime',
38 | ];
39 | }
40 |
--------------------------------------------------------------------------------
/app/Validate/Admin/AdminMenuValidate.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Validate\Admin;
9 |
10 | use App\Validate\BaseValidate;
11 |
12 | class AdminMenuValidate extends BaseValidate
13 | {
14 | protected $rule = [
15 | 'parent_id' => 'required|min:0',
16 | 'name' => 'required',
17 | 'url' => 'required',
18 | 'icon' => 'required',
19 | 'sort_id' => 'required',
20 | 'is_show' => 'required',
21 | 'log_method' => 'required',
22 | ];
23 |
24 | protected $message = [
25 | 'parent_id.required' => '请选择上级菜单',
26 | 'parent_id.min' => 'parent_id必须大于等于0',
27 | 'name.required' => '菜单名称不能为空',
28 | 'url.required' => 'url不能为空',
29 | 'icon.required' => '图标不能为空',
30 | 'sort_id.required' => '排序不能为空',
31 | 'is_show.required' => '请选择是否显示',
32 | 'log_method.required' => '记录类型不能为空',
33 | ];
34 |
35 | protected $scene = [
36 | 'add' => ['parent_id', 'name', 'url', 'icon', 'sort_id', 'is_show', 'log_method'],
37 | 'edit' => ['parent_id', 'name', 'url', 'icon', 'sort_id', 'is_show', 'log_method'],
38 | ];
39 | }
--------------------------------------------------------------------------------
/app/Validate/Admin/AdminRoleValidate.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 | namespace App\Validate\Admin;
8 |
9 | use App\Validate\BaseValidate;
10 |
11 | /**
12 | * AdminRole验证器
13 | */
14 | class AdminRoleValidate extends BaseValidate {
15 |
16 | //验证规则
17 | protected $rule =[
18 | 'name' => 'required',
19 | 'description' => 'required',
20 | 'rules' => 'required',
21 | ];
22 |
23 | //自定义验证信息
24 | protected $message = [
25 | 'name.required' => "名称不能为空",
26 | 'description.required' => '介绍不能为空',
27 | 'rules.required' => '权限不能为空',
28 | ];
29 |
30 | //自定义场景
31 | protected $scene = [
32 | 'add' => ['name', 'description'],
33 | 'edit' => ['name', 'description'],
34 | ];
35 | }
--------------------------------------------------------------------------------
/app/Validate/Admin/AdminUserValidate.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 | namespace App\Validate\Admin;
8 |
9 | use App\Validate\BaseValidate;
10 |
11 | /**
12 | * AdminUser验证器
13 | */
14 | class AdminUserValidate extends BaseValidate {
15 |
16 | //验证规则
17 | protected $rule =[
18 | 'username' => 'required',
19 | 'password' => 'required',
20 | 'new_password' => 'required|confirmed',
21 | 'renew_password' => 'required',
22 | 'new_password_confirmation' => 'required',
23 | 'nickname' => 'required',
24 | 'role' => 'required',
25 | 'status' => 'required',
26 | ];
27 |
28 | //自定义验证信息
29 | protected $message = [
30 | 'username.required' => '请输入用户名',
31 | 'password.required' => '请输入密码',
32 | 'new_password.confirmed' => '新密码不一致',
33 | ];
34 |
35 | //自定义场景
36 | protected $scene = [
37 | 'login' => ['username','password'],
38 | 'add' => ['username', 'password', 'nickname', 'role'],
39 | 'edit' => ['username', 'nickname', 'role'],
40 | 'password' => ['password', 'new_password', 'renew_password','new_password_confirmation'],
41 | 'nickname' => ['nickname'],
42 | ];
43 | }
--------------------------------------------------------------------------------
/app/Validate/Common/SettingGroupValidate.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Validate\Common;
9 |
10 | use App\Validate\BaseValidate;
11 |
12 | class SettingGroupValidate extends BaseValidate
13 | {
14 | protected $rule = [
15 | 'name' => 'required',
16 | 'description' => 'required',
17 | 'module' => 'required',
18 | 'code' => 'required',
19 | 'sort_number' => 'required',
20 | 'auto_create_menu' => 'required',
21 | 'auto_create_file' => 'required',
22 | ];
23 |
24 | protected $message = [
25 | 'name.required' => '名称不能为空',
26 | 'description.required' => '描述不能为空',
27 | 'module.required' => '作用模块不能为空',
28 | 'code.required' => '代码不能为空',
29 | 'sort_number.required' => '排序不能为空',
30 | 'auto_create_menu.required' => '自动生成菜单不能为空',
31 | 'auto_create_file.required' => '自动生成配置文件不能为空',
32 |
33 | ];
34 |
35 | protected $scene = [
36 | 'add' => ['name', 'description', 'module', 'code', 'sort_number', 'auto_create_menu', 'auto_create_file',],
37 | 'edit' => ['name', 'description', 'module', 'code', 'sort_number', 'auto_create_menu', 'auto_create_file',],
38 |
39 | ];
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/app/Validate/Common/SettingValidate.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Validate\Common;
9 |
10 | use App\Validate\BaseValidate;
11 |
12 | class SettingValidate extends BaseValidate
13 | {
14 | protected $rule = [
15 | 'setting_group_id' => 'required',
16 | 'name' => 'required',
17 | 'description' => 'required',
18 | 'code' => 'required',
19 | 'sort_number' => 'required',
20 |
21 | ];
22 |
23 | protected $message = [
24 | 'setting_group_id.required' => '所属分组不能为空',
25 | 'name.required' => '名称不能为空',
26 | 'description.required' => '描述不能为空',
27 | 'code.required' => '代码不能为空',
28 | 'sort_number.required' => '排序不能为空',
29 |
30 | ];
31 |
32 | protected $scene = [
33 | 'add' => ['setting_group_id', 'name', 'description', 'code', 'sort_number',],
34 | 'edit' => ['setting_group_id', 'name', 'description', 'code', 'sort_number',],
35 |
36 | ];
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/app/Validate/Common/UserLevelValidate.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Validate\Common;
9 |
10 | use App\Validate\BaseValidate;
11 |
12 | class UserLevelValidate extends BaseValidate
13 | {
14 | protected $rule = [
15 | 'name' => 'required',
16 | 'description' => 'required',
17 | 'status' => 'required',
18 |
19 | ];
20 |
21 | protected $message = [
22 | 'name.required' => '名称不能为空',
23 | 'description.required' => '简介不能为空',
24 | 'status.required' => '是否启用不能为空',
25 |
26 | ];
27 |
28 | protected $scene = [
29 | 'add' => ['name', 'description', 'status',],
30 | 'edit' => ['name', 'description', 'status',],
31 | ];
32 |
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/app/Validate/Common/UserValidate.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | namespace App\Validate\Common;
9 |
10 | use App\Validate\BaseValidate;
11 |
12 | class UserValidate extends BaseValidate
13 | {
14 | protected $rule = [
15 | 'user_level_id' => 'required',
16 | 'username' => 'required',
17 | 'mobile' => 'required',
18 | 'nickname' => 'required',
19 | 'password' => 'required',
20 | 'status' => 'required',
21 |
22 | ];
23 |
24 | protected $message = [
25 | 'user_level_id.required' => '用户等级不能为空',
26 | 'username.required' => '用户名不能为空',
27 | 'mobile.required' => '手机号不能为空',
28 | 'nickname.required' => '昵称不能为空',
29 | 'password.required' => '密码不能为空',
30 | 'status.required' => '是否启用不能为空',
31 |
32 | ];
33 |
34 | protected $scene = [
35 | 'add' => ['user_level_id', 'username', 'mobile', 'nickname', 'password', 'status',],
36 | 'edit' => ['user_level_id', 'username', 'mobile', 'nickname', 'password', 'status',],
37 | 'api_login' => ['username', 'password'],
38 | ];
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/config/admin/admin.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 |
9 | return [
10 | //基本设置:后台的基本信息设置
11 | 'base'=>[
12 | //后台名称
13 | 'name'=>'laravel通用后台系统',
14 | //后台简称
15 | 'short_name'=>'laravel通用后台系统',
16 | //后台作者
17 | 'author'=>'虞行飞',
18 | //后台版本
19 | 'version'=>'2.0',
20 | ],
21 | //登录设置:后台登录相关设置
22 | 'login'=>[
23 | //登录token验证
24 | 'token'=>'1',
25 | //验证码
26 | 'captcha'=>'1',
27 | //登录背景
28 | 'background'=>'/static/admin/images/default-background.jpg',
29 | ],
30 | //首页设置:后台首页参数设置
31 | 'index'=>[
32 | //默认密码警告
33 | 'password_warning'=>'1',
34 | //是否显示提示信息
35 | 'show_notice'=>'1',
36 | //提示信息内容
37 | 'notice_content'=>'欢迎来到使用本系统,左侧为菜单区域,右侧为功能区。',
38 | ],
39 | ];
--------------------------------------------------------------------------------
/config/admin/attachment.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | return [
9 | 'thumb_path'=>'/static/attachment/thumbnail/',
10 | 'path' => base_path() . 'public/uploads/attachment/', //上传目录配置(相对于根目录)
11 | 'url' => '/uploads/attachment/', //url(相对于web目录)
12 | 'validate' => [
13 | //默认不超过50mb
14 | 'size' => 52428800,
15 | //常用后缀
16 | 'ext' => 'bmp,ico,psd,jpg,jpeg,png,gif,doc,docx,xls,xlsx,pdf,zip,rar,7z,tz,mp3,mp4,mov,swf,flv,avi,mpg,ogg,wav,flac,ape',
17 | ],
18 | ];
--------------------------------------------------------------------------------
/config/admin/template.php:
--------------------------------------------------------------------------------
1 |
6 | */
7 |
8 | define('__ADMIN_STATIC__','/static/admin');
9 |
10 | define('__ADMIN_JS__','/static/admin/js');
11 |
12 | define('__ADMIN_CSS__','/static/admin/css');
13 |
14 | define('__ADMIN_FONTS__','/static/admin/fonts');
15 |
16 | define('__ADMIN_IMAGES__','/static/admin/images');
17 |
18 | define('__ADMIN_PLUGINS__','/static/admin/plugins');
19 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/config/captcha.php:
--------------------------------------------------------------------------------
1 | ['2', '3', '4', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'm', 'n', 'p', 'q', 'r', 't', 'u', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'X', 'Y', 'Z'],
5 | 'default' => [
6 | 'length' => 9,
7 | 'width' => 120,
8 | 'height' => 36,
9 | 'quality' => 90,
10 | 'math' => false,
11 | ],
12 | 'math' => [
13 | 'length' => 9,
14 | 'width' => 120,
15 | 'height' => 36,
16 | 'quality' => 90,
17 | 'math' => true,
18 | ],
19 |
20 | 'flat' => [
21 | 'length' => 6,
22 | 'width' => 160,
23 | 'height' => 46,
24 | 'quality' => 90,
25 | 'lines' => 6,
26 | 'bgImage' => false,
27 | 'bgColor' => '#ecf2f4',
28 | 'fontColors' => ['#2c3e50', '#c0392b', '#16a085', '#c0392b', '#8e44ad', '#303f9f', '#f57c00', '#795548'],
29 | 'contrast' => -5,
30 | ],
31 | 'mini' => [
32 | 'length' => 3,
33 | 'width' => 60,
34 | 'height' => 32,
35 | ],
36 | 'inverse' => [
37 | 'length' => 5,
38 | 'width' => 120,
39 | 'height' => 36,
40 | 'quality' => 90,
41 | 'sensitive' => true,
42 | 'angle' => 12,
43 | 'sharpen' => 10,
44 | 'blur' => 2,
45 | 'invert' => true,
46 | 'contrast' => -5,
47 | ],
48 | 'verify_four' => [
49 | 'length' => 4,
50 | 'width' => 160,
51 | 'height' => 46,
52 | 'quality' => 90,
53 | 'lines' => 6,
54 | 'bgImage' => false,
55 | 'bgColor' => '#ecf2f4',
56 | 'fontColors' => ['#2c3e50', '#c0392b', '#16a085', '#c0392b', '#8e44ad', '#303f9f', '#f57c00', '#795548'],
57 | 'contrast' => -5,
58 | ]
59 | ];
60 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => ['*'],
23 |
24 | 'allowed_origins_patterns' => [],
25 |
26 | 'allowed_headers' => ['*'],
27 |
28 | 'exposed_headers' => [],
29 |
30 | 'max_age' => 0,
31 |
32 | 'supports_credentials' => false,
33 |
34 | ];
35 |
--------------------------------------------------------------------------------
/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 10),
33 | ],
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Argon Options
38 | |--------------------------------------------------------------------------
39 | |
40 | | Here you may specify the configuration options that should be used when
41 | | passwords are hashed using the Argon algorithm. These will allow you
42 | | to control the amount of time it takes to hash the given password.
43 | |
44 | */
45 |
46 | 'argon' => [
47 | 'memory' => 1024,
48 | 'threads' => 2,
49 | 'time' => 2,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(User::class, function (Faker $faker) {
21 | return [
22 | 'name' => $faker->name,
23 | 'email' => $faker->unique()->safeEmail,
24 | 'email_verified_at' => now(),
25 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
26 | 'remember_token' => Str::random(10),
27 | ];
28 | });
29 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_19_150447_create_admin_log_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('id')->autoIncrement();
22 | $table->unsignedInteger('admin_user_id')->default('0')->comment('用户id');
23 | $table->string('name', 30)->collation('utf8mb4_unicode_ci')->default('')->comment('操作');
24 | $table->string('url', 100)->collation('utf8mb4_unicode_ci')->default('')->comment('URL');
25 | $table->string('log_method', 8)->collation('utf8mb4_unicode_ci')->default('不记录')->comment('记录日志方法');
26 | $table->string('log_ip', 20)->collation('utf8mb4_unicode_ci')->default('')->comment('操作IP');
27 | $table->unsignedInteger('create_time')->default('0')->comment('操作时间');
28 | $table->unsignedInteger('update_time')->default('0')->comment('更新时间');
29 |
30 | //表的属性
31 | $table->engine = 'InnoDB';
32 | $table->charset = 'utf8mb4';
33 | $table->collation = 'utf8mb4_unicode_ci';
34 |
35 | //表注释
36 | $table->comment = '后台操作日志';
37 |
38 | });
39 | }
40 |
41 | /**
42 | * Reverse the migrations.
43 | *
44 | * @return void
45 | */
46 | public function down()
47 | {
48 | Schema::dropIfExists('admin_log');
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_19_151328_create_admin_log_data_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('id')->autoIncrement();
22 | $table->unsignedInteger('admin_log_id')->default('0')->comment('日志ID');
23 | $table->text('data')->collation('utf8mb4_unicode_ci')->comment('日志内容');
24 |
25 | //表的属性
26 | $table->engine = 'InnoDB';
27 | $table->charset = 'utf8mb4';
28 | $table->collation = 'utf8mb4_unicode_ci';
29 |
30 | //表注释
31 | $table->comment = '后台操作日志数据';
32 |
33 | });
34 | }
35 |
36 | /**
37 | * Reverse the migrations.
38 | *
39 | * @return void
40 | */
41 | public function down()
42 | {
43 | Schema::dropIfExists('admin_log_data');
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_19_151749_create_admin_menu_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('id')->autoIncrement();
22 | $table->unsignedInteger('parent_id')->default('0')->comment('父级菜单');
23 | $table->string('name', 30)->collation('utf8mb4_unicode_ci')->default('')->comment('名称');
24 | $table->string('url', 100)->collation('utf8mb4_unicode_ci')->default('')->comment('url');
25 | $table->string('route_name', 100)->collation('utf8mb4_unicode_ci')->default('')->comment('路由名或者路由标识');
26 | $table->string('icon', 30)->collation('utf8mb4_unicode_ci')->default('fa-list')->comment('图标');
27 | $table->tinyInteger('is_show')->default('1')->comment('等级');
28 | $table->unsignedInteger('sort_id')->default('1000')->comment('排序');
29 | $table->string('log_method', 8)->collation('utf8mb4_unicode_ci')->default('不记录')->comment('记录日志方法');
30 |
31 | //创建url的索引
32 | $table->index('url','index_url');
33 |
34 | //表的属性
35 | $table->engine = 'InnoDB';
36 | $table->charset = 'utf8mb4';
37 | $table->collation = 'utf8mb4_unicode_ci';
38 |
39 | //表注释
40 | $table->comment = '后台菜单';
41 |
42 | });
43 | }
44 |
45 | /**
46 | * Reverse the migrations.
47 | *
48 | * @return void
49 | */
50 | public function down()
51 | {
52 | Schema::dropIfExists('admin_menu');
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_19_152747_create_admin_role_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('id')->autoIncrement();
22 | $table->string('name', 50)->collation('utf8mb4_unicode_ci')->default('')->comment('名称');
23 | $table->string('description', 100)->collation('utf8mb4_unicode_ci')->default('')->comment('简介');
24 | $table->string('url', 1000)->collation('utf8mb4_unicode_ci')->default('')->comment('权限');
25 | $table->tinyInteger('status')->default('1')->comment('是否启用');
26 |
27 | //表的属性
28 | $table->engine = 'InnoDB';
29 | $table->charset = 'utf8mb4';
30 | $table->collation = 'utf8mb4_unicode_ci';
31 |
32 | //表注释
33 | $table->comment = '后台角色';
34 |
35 | });
36 | }
37 |
38 | /**
39 | * Reverse the migrations.
40 | *
41 | * @return void
42 | */
43 | public function down()
44 | {
45 | Schema::dropIfExists('admin_role');
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_19_153253_create_admin_user_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('id')->autoIncrement();
23 | $table->string('username', 30)->collation('utf8mb4_unicode_ci')->default('')->comment('用户名');
24 | $table->string('password', 255)->collation('utf8mb4_unicode_ci')->default('JDJ5JDEwJGUvaXZQcUMvbHBFcHUvVm16RWRrbU9ROFROYlMvMktwZnZqaGhWQ29uUi5GTGQ5Sng3SzlD')->comment('密码');
25 | $table->string('nickname', 30)->collation('utf8mb4_unicode_ci')->default('')->comment('昵称');
26 | $table->string('avatar', 255)->collation('utf8mb4_unicode_ci')->default('/static/admin/images/avatar.png')->comment('头像');
27 | $table->string('role', 200)->collation('utf8mb4_unicode_ci')->default('')->comment('角色');
28 | $table->tinyInteger('status')->default('1')->comment('是否启用 0:否 1:是');
29 | $table->unsignedInteger('delete_time')->default('0')->comment('删除时间');
30 |
31 | //表的属性
32 | $table->engine = 'InnoDB';
33 | $table->charset = 'utf8mb4';
34 | $table->collation = 'utf8mb4_unicode_ci';
35 |
36 | //表注释
37 | $table->comment = '后台用户';
38 |
39 | });
40 | }
41 |
42 | /**
43 | * Reverse the migrations.
44 | *
45 | * @return void
46 | */
47 | public function down()
48 | {
49 | Schema::dropIfExists('admin_user');
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_19_155756_create_setting_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('id')->autoIncrement();
22 | $table->unsignedInteger('setting_group_id')->default('0')->comment('所属分组');
23 | $table->string('name', 50)->collation('utf8mb4_unicode_ci')->default('')->comment('名称');
24 | $table->string('description', 100)->collation('utf8mb4_unicode_ci')->default('')->comment('描述');
25 | $table->string('code', 50)->collation('utf8mb4_unicode_ci')->default('')->comment('代码');
26 | $table->text('content')->collation('utf8mb4_unicode_ci')->comment('设置配置及内容');
27 | $table->unsignedInteger('sort_number')->default('1000')->comment('排序');
28 | $table->unsignedInteger('create_time')->default('0')->comment('创建时间');
29 | $table->unsignedInteger('update_time')->default('0')->comment('更新时间');
30 | $table->unsignedInteger('delete_time')->default('0')->comment('删除时间');
31 |
32 | //表的属性
33 | $table->engine = 'InnoDB';
34 | $table->charset = 'utf8mb4';
35 | $table->collation = 'utf8mb4_unicode_ci';
36 |
37 | //表注释
38 | $table->comment = '设置';
39 |
40 | });
41 | }
42 |
43 | /**
44 | * Reverse the migrations.
45 | *
46 | * @return void
47 | */
48 | public function down()
49 | {
50 | Schema::dropIfExists('setting');
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/database/migrations/2020_05_19_161818_create_user_level_table.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('id')->autoIncrement();
23 | $table->string('name', 20)->collation('utf8mb4_unicode_ci')->default('')->comment('名称');
24 | $table->string('description', 50)->collation('utf8mb4_unicode_ci')->default('')->comment('简介');
25 | $table->string('img', 255)->collation('utf8mb4_unicode_ci')->default('/static/index/images/user_level_default.png')->comment('图片');
26 | $table->tinyInteger('status')->default('1')->comment('是否启用 0:否 1:是');
27 | $table->unsignedInteger('create_time')->default('0')->comment('创建时间');
28 | $table->unsignedInteger('update_time')->default('0')->comment('更新时间');
29 | $table->unsignedInteger('delete_time')->default('0')->comment('删除时间');
30 |
31 | //表的属性
32 | $table->engine = 'InnoDB';
33 | $table->charset = 'utf8mb4';
34 | $table->collation = 'utf8mb4_unicode_ci';
35 |
36 | //表注释
37 | $table->comment = '用户等级';
38 |
39 | });
40 | }
41 |
42 | /**
43 | * Reverse the migrations.
44 | *
45 | * @return void
46 | */
47 | public function down()
48 | {
49 | Schema::dropIfExists('user_level');
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/database/seeds/AdminRoleSeeder.php:
--------------------------------------------------------------------------------
1 | array(
16 | 'id' => 1,
17 | 'name' => '管理员',
18 | 'description' => '后台管理员角色',
19 | 'url' => '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79',
20 | 'status' => 1,
21 | ),
22 | 1 => array(
23 | 'id' => 2,
24 | 'name' => '测试',
25 | 'description' => '测试人员',
26 | 'url' => '1,2,18,19,20,21,22,23,24,25,26,27,28,29,30,31',
27 | 'status' => 1,
28 | ),
29 | );
30 |
31 | DB::table('admin_role')->insert($arr);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/seeds/AdminUserSeeder.php:
--------------------------------------------------------------------------------
1 | array(
16 | 'id' => 1,
17 | 'username' => 'super_admin',
18 | 'password' => 'JDJ5JDEwJGUzUzVkeHZYSmtBN2Y3SWVORHN4N3VjS29sSDY5UXA4MlJTbjFCYlhCU1J5Y2Rza3JZTkVD',
19 | 'nickname' => '超级管理员',
20 | 'avatar' => '/storage/attachment/3qMSzvq9U6rliFdJzkikBJK4RXXEF5nFNMnkjeFO.png',
21 | 'role' => '1',
22 | 'status' => 1,
23 | 'delete_time' => 0,
24 | ),
25 | 1 => array(
26 | 'id' => 2,
27 | 'username' => 'test01',
28 | 'password' => 'JDJ5JDEwJGUzUzVkeHZYSmtBN2Y3SWVORHN4N3VjS29sSDY5UXA4MlJTbjFCYlhCU1J5Y2Rza3JZTkVD',
29 | 'nickname' => '测试人员',
30 | 'avatar' => '/storage/attachment/UUcsQTJXYqPfD7rAC97yqLOk1ns8fVUy3ViGYGyS.png',
31 | 'role' => '2',
32 | 'status' => 1,
33 | 'delete_time' => 0,
34 | ),
35 | );
36 |
37 | DB::table('admin_user')->insert($arr);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call([
15 | AdminMenuSeeder::class,
16 | AdminRoleSeeder::class,
17 | AdminUserSeeder::class,
18 | SettingGroupSeeder::class,
19 | SettingSeeder::class,
20 | UserLevelSeeder::class,
21 | UserSeeder::class,
22 | ]);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/database/seeds/SettingGroupSeeder.php:
--------------------------------------------------------------------------------
1 | array(
16 | 'id' => 1,
17 | 'module' => 'admin',
18 | 'name' => '后台设置',
19 | 'description' => '后台管理方面的设置',
20 | 'code' => 'admin',
21 | 'sort_number' => 1000,
22 | 'auto_create_menu' => 1,
23 | 'auto_create_file' => 1,
24 | 'icon' => 'fa-adjust',
25 | 'create_time' => 1587879871,
26 | 'update_time' => 1587879871,
27 | 'delete_time' => 0,
28 | ),
29 | );
30 |
31 | DB::table('setting_group')->insert($arr);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "npm run development -- --watch",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.19",
14 | "cross-env": "^7.0",
15 | "laravel-mix": "^5.0.1",
16 | "lodash": "^4.17.13",
17 | "resolve-url-loader": "^3.1.0",
18 | "sass": "^1.15.2",
19 | "sass-loader": "^8.0.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
字段名 | 15 |类型 | 16 |排序规则 | 17 |是否为空 | 18 |是否为主键 | 19 |默认值 | 20 |更多信息 | 21 |备注 | 22 |
---|---|---|---|---|---|---|---|
{{$item['name']}} | 28 |{{$item['type']}} | 29 |{{$item['collation']}} | 30 |{{$item['null']}} | 31 |{{$item['key']}} | 32 |{{$item['default']}} | 33 |{{$item['extra']}} | 34 |{{$item['comment']}} | 35 |