├── public ├── favicon.ico ├── .gitignore ├── api-doc │ └── .gitignore ├── robots.txt ├── app-down │ ├── .gitignore │ ├── img │ │ ├── and.png │ │ ├── back.png │ │ ├── logo.png │ │ ├── and_back.jpg │ │ ├── iosicon.png │ │ └── androidicon.png │ ├── index.html │ └── index.js ├── dist │ └── img │ │ ├── logo.png │ │ ├── avatar.png │ │ ├── avatar2.png │ │ ├── avatar3.png │ │ ├── avatar5.png │ │ ├── error.jpg │ │ ├── icons.png │ │ ├── logo1.png │ │ ├── photo1.png │ │ ├── photo2.png │ │ ├── photo3.jpg │ │ ├── photo4.jpg │ │ ├── avatar04.png │ │ ├── login-bg.jpg │ │ ├── wangjing.png │ │ ├── credit │ │ ├── visa.png │ │ ├── cirrus.png │ │ ├── mestro.png │ │ ├── paypal.png │ │ ├── paypal2.png │ │ ├── mastercard.png │ │ └── american-express.png │ │ ├── default-50x50.gif │ │ ├── user1-128x128.jpg │ │ ├── user2-160x160.jpg │ │ ├── user3-128x128.jpg │ │ ├── user4-128x128.jpg │ │ ├── user5-128x128.jpg │ │ ├── user6-128x128.jpg │ │ ├── user7-128x128.jpg │ │ ├── user8-128x128.jpg │ │ └── user_default_180.gif ├── bower_components │ ├── .gitignore │ ├── googleapis-fonts │ │ ├── 说明.txt │ │ ├── M2Jd71oPJhLKp0zdtTvoM40tgx99jmYGv_xzYuwd1rU.woff2 │ │ ├── M2Jd71oPJhLKp0zdtTvoM7YHq4FgHI02B8rPccK0FJQ.woff2 │ │ ├── M2Jd71oPJhLKp0zdtTvoMxgy2Fsj5sj3EzlXpqVXRKo.woff2 │ │ ├── ODelI1aHBYDBqgeIAH2zlC2Q8seG17bfDXYR_jUsrzg.woff2 │ │ ├── ODelI1aHBYDBqgeIAH2zlNOAHFN6BivSraYkjhveRHY.woff2 │ │ ├── ODelI1aHBYDBqgeIAH2zlNV_2ngZ8dMf8fLgjYEouxg.woff2 │ │ ├── fpTVHK8qsXbIeTHTrnQH6CzM2XYAq8cDhaXsrN8WXcA.woff2 │ │ ├── fpTVHK8qsXbIeTHTrnQH6E78GtRp3lhchupCJNw8t58.woff2 │ │ ├── fpTVHK8qsXbIeTHTrnQH6GQKuzMuncr0JB710wa2dPI.woff2 │ │ ├── fpTVHK8qsXbIeTHTrnQH6Lpx497t94oDua8KfAL9f-E.woff2 │ │ ├── fpTVHK8qsXbIeTHTrnQH6MAjkyiewWYrWZc50I8hK7I.woff2 │ │ ├── fpTVHK8qsXbIeTHTrnQH6OXKTZYPNtG1yMB_YJSqlic.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGCOFnW3Jk0f09zW_Yln67Ac.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGClYwVOhDRq2vbpGRTZ7bbs.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGDRVvBvQIc1z78c__uoBcyI.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGD_j0nMiB9fPhg_k1wdK2h0.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGDovqjS_dXPZszO_XltPdNg.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGEo0As1BFRXtCDhS66znb_k.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGFKFh1TDTPrUZWzVp6FtpG8.woff2 │ │ ├── toadOcfmlt9b38dHJxOBGFxe-GPfKKFmiXaJ_Q0GFr8.woff2 │ │ └── toadOcfmlt9b38dHJxOBGOode0-EuMkY--TSyExeINg.woff2 │ └── pdfjs │ │ └── build │ │ └── pdf.worker.entry.js ├── .htaccess ├── web.config └── index.php ├── docker ├── php │ ├── ini │ │ └── php.ini │ ├── config.json │ ├── cron │ ├── cron.sh │ └── reload.sh ├── .gitignore ├── nginx │ ├── vhost │ │ ├── .gitignore │ │ ├── www.laraveladmin.cn.back │ │ └── local_laraveladmin_cn.key │ ├── default.conf │ └── vhost_dev │ │ └── local.laraveladmin.cn.conf ├── node │ └── Dockerfile ├── redis │ └── Dockerfile ├── daemon.json └── mysql │ └── my.cnf ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── resources ├── theme │ └── .gitignore ├── js │ ├── plugin │ │ └── .gitignore │ ├── pages │ │ ├── layout.vue │ │ ├── admin │ │ │ ├── developments │ │ │ │ └── menus.vue │ │ │ └── components │ │ │ │ └── message.vue │ │ ├── open │ │ │ ├── components │ │ │ │ ├── logo.vue │ │ │ │ └── icp.vue │ │ │ ├── index.vue │ │ │ ├── messages │ │ │ │ └── index.vue │ │ │ └── apps │ │ │ │ └── index.vue │ │ ├── home │ │ │ └── index.vue │ │ └── errors │ │ │ ├── 503.vue │ │ │ ├── 403.vue │ │ │ ├── 500.vue │ │ │ └── 404.vue │ ├── components │ │ ├── language │ │ │ ├── flags.png │ │ │ └── flags@2x.png │ │ ├── videoPlayer.vue │ │ ├── componentDemos.vue │ │ └── hideMore.vue │ ├── store │ │ └── notification.js │ ├── bootstrap.js │ ├── i18n.js │ └── app.js ├── views │ ├── api_doc.blade.php │ ├── emails │ │ ├── register.blade.php │ │ ├── login.blade.php │ │ ├── forgot_password.blade.php │ │ └── activation.blade.php │ ├── php │ │ ├── seed.blade.php │ │ └── migration.blade.php │ └── html │ │ └── index.blade.php ├── sass │ ├── tailwindcss.scss │ ├── app.scss │ └── _variables.scss ├── less │ └── adminlte.less └── lang │ ├── zh-TW │ ├── status.php │ ├── pagination.php │ ├── auth.php │ ├── passwords.php │ ├── _shared.php │ └── commands.php │ ├── en │ ├── pagination.php │ ├── status.php │ ├── auth.php │ ├── _shared.php │ └── passwords.php │ ├── zh-CN │ ├── _shared.php │ ├── status.php │ ├── pagination.php │ ├── auth.php │ ├── passwords.php │ └── commands.php │ └── vendor │ ├── ueditor │ ├── zh-CN │ │ └── upload.php │ ├── zh-TW │ │ └── upload.php │ └── en │ │ └── upload.php │ └── backup │ ├── zh-CN │ └── notifications.php │ ├── zh-TW │ └── notifications.php │ └── ja │ └── notifications.php ├── database ├── .gitignore ├── seeders │ ├── MenuRoleTableSeeder.php │ ├── AdminRoleTableSeeder.php │ ├── AdminTableSeeder.php │ ├── RoleTableSeeder.php │ ├── UserTableSeeder.php │ ├── DatabaseSeeder.php │ ├── ResponseTableSeeder.php │ ├── ParamTableSeeder.php │ └── Commands │ │ └── ForceDeleteSeeder.php ├── migrations │ ├── 2014 │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ ├── 2014_08_20_000000_create_failed_jobs_table.php │ │ ├── 2014_10_23_150055_create_jobs_table.php │ │ └── 2014_10_12_000000_create_users_table.php │ ├── 2019 │ │ ├── 2019_08_14_102736_create_menu_role_table.php │ │ ├── 2019_08_14_102734_create_admin_role_table.php │ │ ├── 2019_08_14_102732_create_admins_table.php │ │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ │ ├── 2019_08_14_113621_create_responses_table.php │ │ ├── 2019_08_14_101143_create_ousers_table.php │ │ ├── 2019_08_14_102737_create_logs_table.php │ │ ├── 2019_08_14_102738_create_configs_table.php │ │ ├── 2019_08_14_113621_create_params_table.php │ │ ├── 2019_08_14_102733_create_roles_table.php │ │ └── 2019_08_14_102735_create_menus_table.php │ ├── 2021 │ │ ├── 2021_12_07_234324_alert_users_client_id_table.php │ │ ├── 2021_08_04_234324_alert_params_use_table.php │ │ ├── 2021_02_01_234324_alert_menus_use_table.php │ │ └── 2021_01_25_234324_alert_menus_group_table.php │ ├── 2022 │ │ └── 2022_11_19_234324_alert_menus_reload_table.php │ ├── 2023 │ │ ├── 2023_07_04_175536_alert_users_message_id_table.php │ │ ├── 2023_07_02_231056_create_messages_table.php │ │ └── 2023_07_02_160011_create_apps_table.php │ └── 2024 │ │ └── 2024_03_20_102737_alert_logs_created_at_index_table.php └── factories │ └── UserFactory.php ├── storage ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore ├── debugbar │ └── .gitignore ├── logs │ ├── mysql │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── .gitattributes ├── update.sh ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── app ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── PersonageController.php │ │ │ └── AppController.php │ │ ├── Home │ │ │ └── IndexController.php │ │ ├── Controller.php │ │ └── Open │ │ │ ├── GeetestController.php │ │ │ ├── QiNiuController.php │ │ │ └── MessageController.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── VerifyCsrfToken.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrustProxies.php │ │ ├── EncryptCookies.php │ │ ├── ThrottleRequests.php │ │ ├── ActivatedMiddleware.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── AdminMiddleware.php │ │ ├── LanguageMiddleware.php │ │ ├── AuthenticateRedirect.php │ │ └── ClientMiddleware.php ├── Models │ ├── Traits │ │ ├── ExcludeTop.php │ │ ├── ExcludeTopScope.php │ │ └── UsesUuid.php │ ├── Casts │ │ ├── RateCast.php │ │ ├── StrSplitCast.php │ │ └── BitCheckCast.php │ └── App.php ├── Facades │ ├── SMS.php │ ├── Option.php │ ├── ClientAuth.php │ ├── Formatter.php │ └── LifeData.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Swoole │ └── Coroutine │ │ └── Redis │ │ ├── PhpRedisClusterConnection.php │ │ └── PhpRedisConnector.php ├── Console │ ├── BaseCommand.php │ ├── Commands │ │ ├── MigrateAllCommand.php │ │ └── BuildIndexHtml.php │ ├── Kernel.php │ └── DevelopCommands │ │ └── CreateSeed.php ├── Jobs │ └── SendSms.php ├── Mail │ └── SendMessage.php └── Services │ ├── SMSNewService.php │ ├── SessionService.php │ └── ResetProviders.php ├── tailwind.js ├── .styleci.yml ├── .editorconfig ├── .gitignore ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── server.php ├── config ├── cors.php ├── view.php ├── translate.php ├── hashing.php ├── sanctum.php ├── broadcasting.php └── services.php ├── LICENSE ├── composer-check.php ├── phpunit.xml └── artisan /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker/php/ini/php.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | 3 | -------------------------------------------------------------------------------- /public/api-doc/.gitignore: -------------------------------------------------------------------------------- 1 | !index.html 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /docker/.gitignore: -------------------------------------------------------------------------------- 1 | !docker-compose.yml 2 | 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /resources/theme/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/mysql/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/app-down/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | !index.html 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !mysql 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /resources/js/plugin/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | rsa.js 3 | rsa_*.js 4 | -------------------------------------------------------------------------------- /resources/views/api_doc.blade.php: -------------------------------------------------------------------------------- 1 | {!! file_get_contents(public_path('/api-doc/index.html')) !!} 2 | -------------------------------------------------------------------------------- /docker/nginx/vhost/.gitignore: -------------------------------------------------------------------------------- 1 | *.pem 2 | *.key 3 | !local_laraveladmin_cn.key 4 | !local_laraveladmin_cn.pem 5 | -------------------------------------------------------------------------------- /public/dist/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/logo.png -------------------------------------------------------------------------------- /public/app-down/img/and.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/app-down/img/and.png -------------------------------------------------------------------------------- /public/dist/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/avatar.png -------------------------------------------------------------------------------- /public/dist/img/avatar2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/avatar2.png -------------------------------------------------------------------------------- /public/dist/img/avatar3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/avatar3.png -------------------------------------------------------------------------------- /public/dist/img/avatar5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/avatar5.png -------------------------------------------------------------------------------- /public/dist/img/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/error.jpg -------------------------------------------------------------------------------- /public/dist/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/icons.png -------------------------------------------------------------------------------- /public/dist/img/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/logo1.png -------------------------------------------------------------------------------- /public/dist/img/photo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/photo1.png -------------------------------------------------------------------------------- /public/dist/img/photo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/photo2.png -------------------------------------------------------------------------------- /public/dist/img/photo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/photo3.jpg -------------------------------------------------------------------------------- /public/dist/img/photo4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/photo4.jpg -------------------------------------------------------------------------------- /public/app-down/img/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/app-down/img/back.png -------------------------------------------------------------------------------- /public/app-down/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/app-down/img/logo.png -------------------------------------------------------------------------------- /public/dist/img/avatar04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/avatar04.png -------------------------------------------------------------------------------- /public/dist/img/login-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/login-bg.jpg -------------------------------------------------------------------------------- /public/dist/img/wangjing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/wangjing.png -------------------------------------------------------------------------------- /public/app-down/img/and_back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/app-down/img/and_back.jpg -------------------------------------------------------------------------------- /public/app-down/img/iosicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/app-down/img/iosicon.png -------------------------------------------------------------------------------- /public/dist/img/credit/visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/credit/visa.png -------------------------------------------------------------------------------- /public/dist/img/credit/cirrus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/credit/cirrus.png -------------------------------------------------------------------------------- /public/dist/img/credit/mestro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/credit/mestro.png -------------------------------------------------------------------------------- /public/dist/img/credit/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/credit/paypal.png -------------------------------------------------------------------------------- /public/dist/img/credit/paypal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/credit/paypal2.png -------------------------------------------------------------------------------- /public/dist/img/default-50x50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/default-50x50.gif -------------------------------------------------------------------------------- /public/dist/img/user1-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user1-128x128.jpg -------------------------------------------------------------------------------- /public/dist/img/user2-160x160.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user2-160x160.jpg -------------------------------------------------------------------------------- /public/dist/img/user3-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user3-128x128.jpg -------------------------------------------------------------------------------- /public/dist/img/user4-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user4-128x128.jpg -------------------------------------------------------------------------------- /public/dist/img/user5-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user5-128x128.jpg -------------------------------------------------------------------------------- /public/dist/img/user6-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user6-128x128.jpg -------------------------------------------------------------------------------- /public/dist/img/user7-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user7-128x128.jpg -------------------------------------------------------------------------------- /public/dist/img/user8-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user8-128x128.jpg -------------------------------------------------------------------------------- /resources/js/pages/layout.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | 9 | -------------------------------------------------------------------------------- /public/app-down/img/androidicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/app-down/img/androidicon.png -------------------------------------------------------------------------------- /public/dist/img/credit/mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/credit/mastercard.png -------------------------------------------------------------------------------- /public/dist/img/user_default_180.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/user_default_180.gif -------------------------------------------------------------------------------- /public/bower_components/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !dataTables 4 | !googleapis-fonts 5 | !katex 6 | !pdfjs 7 | !select2/select2.js 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /resources/js/components/language/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/resources/js/components/language/flags.png -------------------------------------------------------------------------------- /public/dist/img/credit/american-express.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/dist/img/credit/american-express.png -------------------------------------------------------------------------------- /public/bower_components/googleapis-fonts/说明.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/public/bower_components/googleapis-fonts/说明.txt -------------------------------------------------------------------------------- /resources/js/components/language/flags@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laraveladmin-cn/laraveladmin/HEAD/resources/js/components/language/flags@2x.png -------------------------------------------------------------------------------- /resources/sass/tailwindcss.scss: -------------------------------------------------------------------------------- 1 | //tailwindcss 2 | @import "~tailwindcss/base"; 3 | @import "~tailwindcss/components"; 4 | @import "~tailwindcss/utilities"; 5 | -------------------------------------------------------------------------------- /resources/less/adminlte.less: -------------------------------------------------------------------------------- 1 | @import "~admin-lte/build/less/AdminLTE.less"; 2 | @import "~admin-lte/build/less/skins/_all-skins.less"; 3 | @import "skin-dark.css"; 4 | -------------------------------------------------------------------------------- /resources/lang/zh-TW/status.php: -------------------------------------------------------------------------------- 1 | 5 | # 用户注册 6 | 您好:
7 |         您的账号注册验证码是: `{{$code}}` 8 |
9 | 请在1小时内使用该验证码 10 | 11 | 谢谢,{{ config('app.name') }} 12 | @endcomponent 13 | -------------------------------------------------------------------------------- /docker/php/cron: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 3 | #demo项目定时任务 4 | */1 * * * * /bin/su - www-data -s /bin/bash -c '/var/www/laravel/laraveladmin/docker/php/cron.sh >> /dev/null 2>&1' 5 | #测试定时任务是否执行 6 | #*/1 * * * * echo 'test' >> /tmp/test.txt 7 | #必须空行保证定时任务在执行 8 | -------------------------------------------------------------------------------- /resources/lang/zh-TW/passwords.php: -------------------------------------------------------------------------------- 1 | > /dev/null 2>&1 & 11 | done 12 | -------------------------------------------------------------------------------- /app/Models/Traits/ExcludeTop.php: -------------------------------------------------------------------------------- 1 | 5 | # 用户登录 6 | {{Arr::get($user,'name',Arr::get($user,'uname'))}} 您好:
7 |         您的找回密码验证码是: `{{$code}}` 8 |
9 | 请在1小时内使用该验证码 10 | 11 | 谢谢,{{ config('app.name') }} 12 | @endcomponent 13 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /resources/js/store/notification.js: -------------------------------------------------------------------------------- 1 | //通知数据存储 2 | 3 | export default { 4 | namespaced: true, 5 | state:{ 6 | notifications:[] 7 | }, 8 | mutations:{ 9 | //更新state状态 10 | set (state,payload) { 11 | state[payload.key] = payload[payload.key]; 12 | } 13 | }, 14 | actions:{}, 15 | getters:{} 16 | }; -------------------------------------------------------------------------------- /resources/views/emails/forgot_password.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | 5 | # 找回密码 6 | {{Arr::get($user,'name',Arr::get($user,'uname'))}} 您好:
7 |         您的找回密码验证码是: `{{$code}}` 8 |
9 | 请在1小时内使用该验证码 10 | 11 | 谢谢,{{ config('app.name') }} 12 | @endcomponent 13 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/seeders/MenuRoleTableSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); //角色权限关联表 17 | 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Facades/Option.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 5 | # 用户注册激活 6 | {{Arr::get($user,'name',Arr::get($user,'uname'))}} 您好:
7 |         您用 {{ config('app.name', 'LaravelAdmin') }} 注册了本站账号 8 |
9 | 请在1 小时内点击此链接以完成激活 {{$url}} 10 | 11 | @component('mail::button', ['url' => $url]) 12 | 激活用户 13 | @endcomponent 14 | 15 | 谢谢,{{ config('app.name') }} 16 | @endcomponent 17 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | truncate(); 17 | \App\Models\Admin::find(1)->roles()->save(\App\Models\Role::find(1)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/Casts/StrSplitCast.php: -------------------------------------------------------------------------------- 1 | truncate(); 17 | //创建后台用户 18 | \App\Models\User::find(1)->admin() 19 | ->save(\App\Models\Admin::create([])); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docker/php/reload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #set -x 3 | ##代码更新重载phpswoole 4 | code_dir=${LARAVEL_DIR} 5 | if [ "${code_dir}" = "" ] 6 | then 7 | code_dir="/var/www/laravel" 8 | fi 9 | projects=`ls $code_dir` 10 | for project in ${projects} 11 | do 12 | export $(grep -Ev '^$|[#;]' ${code_dir}/${project}/.env | xargs) 13 | if ! [ "${SWOOLE_HTTP_HOST}" = "" ] 14 | then 15 | php ${code_dir}/${project}/artisan swoole:http reload 16 | fi 17 | unset $(grep -Ev '^$|[#;]' ${code_dir}/${project}/.env | sed -E 's/(.*)=.*/\1/') 18 | done 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | bindModel; 16 | $json_data=<<<'{{$json}}' 17 | {!! $data !!} 18 | {{$json}}; 19 | $data = json_decode($json_data,true); 20 | $class::insertReplaceAll($data); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | 3 | /public/mix-manifest.json 4 | /public/mix-manifest-css.json 5 | /public/mix-manifest-tailwindcss.json 6 | /public/hot 7 | /public/storage 8 | /storage/*.key 9 | /public/index.html 10 | /public/js 11 | /public/fonts 12 | /public/images 13 | /public/css 14 | /public/api 15 | /public/web-api 16 | /vendor 17 | .env 18 | .env.backup 19 | .phpunit.result.cache 20 | Homestead.json 21 | Homestead.yaml 22 | npm-debug.log 23 | yarn-error.log 24 | docker-compose.yml 25 | /docker/mysql/init.sql 26 | __MACOSX 27 | .idea 28 | composer.lock 29 | *.DS_Store 30 | front_end 31 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | //对数据集合进行处理 2 | window.collect = require('collect.js'); 3 | //加载jQuery 4 | try { 5 | window.$ = window.jQuery = require('jquery'); 6 | } catch (e) {} 7 | //加载jQuery 8 | try { 9 | window.JSEncrypt = require('jsencrypt').default; 10 | } catch (e) {} 11 | import { Base64 } from 'js-base64'; 12 | window.Base64 = Base64; 13 | try { 14 | window.CryptoJS = require("crypto-js"); 15 | } catch (e) {} 16 | //网络请求 17 | window.axios = require('axios'); 18 | //velocity动画 19 | window.Velocity = require('velocity-animate'); 20 | require("velocity-animate/velocity.ui.js"); 21 | 22 | -------------------------------------------------------------------------------- /app/Models/Traits/ExcludeTopScope.php: -------------------------------------------------------------------------------- 1 | getAttribute('level_key')?: 'level' ; 21 | $builder->where($model->getTable().'.'.$level_key,'>',1); 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/Casts/BitCheckCast.php: -------------------------------------------------------------------------------- 1 | getFieldsMap($key)->toArray(); 14 | unset($field[0]); 15 | return multiple($value,$field); 16 | } 17 | 18 | public function set($model, string $key, $value, array $attributes) 19 | { 20 | return multipleToNum($value); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /resources/lang/zh-CN/status.php: -------------------------------------------------------------------------------- 1 | '路由重定向', 16 | 'redirectTo' => '路由重定向至', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/zh-CN/pagination.php: -------------------------------------------------------------------------------- 1 | '« 上一页', 16 | 'next' => '下一页 »', 17 | ]; 18 | -------------------------------------------------------------------------------- /resources/lang/zh-CN/auth.php: -------------------------------------------------------------------------------- 1 | '用户名或密码错误。', 16 | 'throttle' => '您的尝试登录次数过多,请 :seconds 秒后再试。', 17 | ]; 18 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /database/seeders/RoleTableSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); //角色表 18 | //ID:1 19 | Role::create([ 20 | 'name'=>'Superadministrator', //超级管理员 21 | 'description' => 'Have all operation permissions' //拥有所有操作权限。 22 | ]); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /resources/js/pages/admin/developments/menus.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /resources/js/pages/open/components/logo.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /resources/js/pages/open/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 23 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | //字体 3 | @import url('/bower_components/googleapis-fonts/fonts.css'); 4 | @import url('/bower_components/bootstrap/dist/css/bootstrap.min.css'); 5 | @import url('/bower_components/dataTables/dataTables.bootstrap.min.css'); 6 | //图标 7 | @import url('/bower_components/font-awesome/css/font-awesome.min.css'); 8 | @import url('/bower_components/ionicons/css/ionicons.min.css'); 9 | //动画效果 10 | @import url('/bower_components/animate.css/animate.min.css'); 11 | 12 | //bootstrap主题 13 | @import '~bootstrap-sass/assets/stylesheets/bootstrap/theme'; 14 | 15 | //饿了么UI主题 16 | @import '~element-ui/packages/theme-chalk/src/index'; 17 | 18 | //自定义样式 19 | @import 'custom.scss'; 20 | -------------------------------------------------------------------------------- /resources/js/components/videoPlayer.vue: -------------------------------------------------------------------------------- 1 | 10 | 27 | 28 | 33 | -------------------------------------------------------------------------------- /app/Swoole/Coroutine/Redis/PhpRedisClusterConnection.php: -------------------------------------------------------------------------------- 1 | client->_masters() as $master) { 18 | $async 19 | ? $this->command('rawCommand', [$master, 'flushdb', 'async']) 20 | : $this->command('flushdb', [$master]); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.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 | -------------------------------------------------------------------------------- /resources/lang/zh-CN/passwords.php: -------------------------------------------------------------------------------- 1 | '密码至少是六位字符并且应与确认密码匹配。', 16 | 'reset' => '密码重置成功!', 17 | 'sent' => '密码重置邮件已发送!', 18 | 'token' => '密码重置令牌无效。', 19 | 'user' => '找不到该邮箱对应的用户。', 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/js/pages/open/components/icp.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | 20 | 30 | -------------------------------------------------------------------------------- /app/Models/Traits/UsesUuid.php: -------------------------------------------------------------------------------- 1 | getKey()) { 21 | $model->{$model->getKeyName()} = (string) Str::uuid(); 22 | } 23 | }); 24 | } 25 | 26 | public function getIncrementing() 27 | { 28 | return false; 29 | } 30 | 31 | public function getKeyType() 32 | { 33 | return 'string'; 34 | } 35 | 36 | 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | except = [ 15 | 'Authorization', 16 | config('laravel_admin.client_id_key'), 17 | 'Language', 18 | 'Open-Id' 19 | ]; 20 | } 21 | 22 | /** 23 | * The names of the cookies that should not be encrypted. 24 | * 25 | * @var array 26 | */ 27 | protected $except = []; 28 | } 29 | -------------------------------------------------------------------------------- /public/bower_components/pdfjs/build/pdf.worker.entry.js: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 Mozilla Foundation 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | (typeof window !== 'undefined' ? window : {}).pdfjsWorker = 17 | require('./pdf.worker.js'); 18 | -------------------------------------------------------------------------------- /database/migrations/2024/2024_03_20_102737_alert_logs_created_at_index_table.php: -------------------------------------------------------------------------------- 1 | index('created_at'); 18 | $table->index('user_id'); 19 | }); 20 | } 21 | 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::table('logs', function (Blueprint $table) { 31 | $table->dropIndex('created_at'); 32 | $table->dropIndex('user_id'); 33 | }); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /resources/js/i18n.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueI18n from 'vue-i18n'; //多语言设置 3 | import { configure } from 'vee-validate'; 4 | configure({ 5 | // this will be used to generate messages. 6 | defaultMessage: (field, values) => { 7 | values._field_ = i18n.t(`fields.${field}`); 8 | if(values._field_.indexOf('fields.')==0){ 9 | values._field_ = field; 10 | } 11 | return i18n.t(`validations.messages.${values._rule_}`, values); 12 | } 13 | }); 14 | Vue.use(VueI18n); 15 | const locales = { 16 | 'en':require('../shared_lang/en/front.json'), 17 | 'zh-CN':require('../shared_lang/zh-CN/front.json') 18 | }; 19 | const i18n = new VueI18n({ 20 | locale: 'zh-CN', 21 | fallbackLocale: 'en', 22 | silentTranslationWarn: true, 23 | messages: locales, 24 | }); 25 | 26 | export default i18n; 27 | 28 | -------------------------------------------------------------------------------- /database/migrations/2023/2023_07_04_175536_alert_users_message_id_table.php: -------------------------------------------------------------------------------- 1 | integer('message_id')->unsigned()->default(0)->index()->comment('已读最新消息ID$select2'); 14 | }); 15 | } 16 | 17 | /** 18 | * Reverse the migrations. 19 | * 20 | * @return void 21 | */ 22 | public function down() 23 | { 24 | Schema::table('users', function (Blueprint $table) { 25 | $table->dropColumn([ 26 | 'message_id' 27 | ]); 28 | }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /database/seeders/UserTableSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); //用户表 19 | //ID:1 创建一个超级管理员用户 20 | User::create([ 21 | 'uname'=>config('laravel_admin.admin_user_name'), 22 | 'name'=>config('app.name'), 23 | 'password'=>strval(config('laravel_admin.admin_password')), 24 | 'mobile_phone'=>13699411148, 25 | 'email'=>'214986304@qq.com', 26 | 'status'=>1 27 | ]); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /resources/js/pages/home/index.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 32 | -------------------------------------------------------------------------------- /database/migrations/2014/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Console/BaseCommand.php: -------------------------------------------------------------------------------- 1 | description,$this->transPath); 22 | } 23 | 24 | /** 25 | * 语言翻译 26 | * @param $key 27 | * @param array $replace 28 | * @return array|\Illuminate\Contracts\Translation\Translator|string|null 29 | */ 30 | public function trans($key,$replace=[],$path='',$locale = null){ 31 | return trans_path($key,$path?$this->transPath.'.'.$path:$this->transPath,$replace,$locale); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name, 27 | 'email' => $this->faker->unique()->safeEmail, 28 | 'email_verified_at' => now(), 29 | 'password' => bcrypt(config('laravel_admin.admin_password')), // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UpdateFacadeCode::class); 15 | $this->call(ConfigTableSeeder::class); //系统配置安装 16 | $this->call(MenuTableSeeder::class); //菜单数据安装 17 | $this->call(RoleTableSeeder::class); //角色数据安装 18 | $this->call(MenuRoleTableSeeder::class); //角色对应菜单安装 19 | $this->call(UserTableSeeder::class); //初始用户安装 20 | $this->call(AdminTableSeeder::class); //初始后台用户安装 21 | $this->call(AdminRoleTableSeeder::class); //后台用户添加角色安装 22 | $this->call(ParamTableSeeder::class); //接口文档参数说明 23 | $this->call(ResponseTableSeeder::class); //接口文档响应说明 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_102736_create_menu_role_table.php: -------------------------------------------------------------------------------- 1 | integer('role_id')->index()->comment('角色ID'); 18 | $table->integer('menu_id')->index()->comment('菜单ID'); 19 | $table->primary(['role_id','menu_id']); 20 | //设置表备注 21 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 22 | ' COMMENT="菜单-角色"'; 23 | }); 24 | } 25 | 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('menu_role'); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_102734_create_admin_role_table.php: -------------------------------------------------------------------------------- 1 | integer('admin_id')->index()->comment('用户ID'); 18 | $table->integer('role_id')->index()->comment('角色ID'); 19 | $table->primary(['admin_id','role_id']); 20 | //设置表备注 21 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 22 | ' COMMENT="后台用户-角色"'; 23 | }); 24 | } 25 | 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('admin_role'); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2021/2021_12_07_234324_alert_users_client_id_table.php: -------------------------------------------------------------------------------- 1 | string('client_id', 255)->default('')->comment('客户端ID'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('users', function (Blueprint $table) { 30 | $table->dropColumn([ 31 | 'client_id' 32 | ]); 33 | }); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /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' => true, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /database/migrations/2021/2021_08_04_234324_alert_params_use_table.php: -------------------------------------------------------------------------------- 1 | tinyInteger('use')->unsigned()->default(0)->comment('所属类型:0-url参数,1-body参数'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::table('params', function (Blueprint $table) { 31 | $table->dropColumn([ 32 | 'use' 33 | ]); 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Controllers/Open/GeetestController.php: -------------------------------------------------------------------------------- 1 | @Auth::user()?@Auth::user()->id:'UnLoginUser', 21 | 'client_type' => 'web', 22 | 'ip_address' => RequestFacade::header('x-real-ip',RequestFacade::ip()) 23 | ]; 24 | $status = Geetest::preProcess($data); 25 | SessionService::put('gtserver', $status); 26 | SessionService::put('user_id', $data['user_id']); 27 | return Geetest::getResponseStr(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/migrations/2022/2022_11_19_234324_alert_menus_reload_table.php: -------------------------------------------------------------------------------- 1 | tinyInteger('is_out_link')->unsigned()->default(0)->comment('是否为外部链接:0-否,1-是'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('menus', function (Blueprint $table) { 30 | $table->dropColumn([ 31 | 'is_out_link' 32 | ]); 33 | }); 34 | } 35 | 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Middleware/ThrottleRequests.php: -------------------------------------------------------------------------------- 1 | user()) { 22 | return sha1($user->getAuthIdentifier()); 23 | } elseif ($route = $request->route()) { 24 | $ip = RequestFacade::header('x-real-ip',$request->ip()); //swoole兼容中获取真实ip 25 | return sha1($route->getDomain().'|'.$ip); 26 | } 27 | 28 | throw new \RuntimeException(trans('Unable to generate the request signature, Route unavailable')); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_102732_create_admins_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->integer('user_id')->default(0)->index()->comment('用户ID@required|exists:users,id|unique:admins,user_id'); 19 | $table->timestamps(); 20 | $table->softDeletes(); 21 | //设置表备注 22 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 23 | ' COMMENT="后台用户$softDeletes,timestamps"'; 24 | }); 25 | } 26 | 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('admins'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2014/2014_08_20_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Controllers/Open/QiNiuController.php: -------------------------------------------------------------------------------- 1 | uploadToken($bucket, null, 3600); 23 | return [ 24 | 'token' => $token, 25 | 'domain' => config($prefix . 'transport') . '://' . config($prefix . 'domains.default') 26 | ]; 27 | 28 | } 29 | 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014/2014_10_23_150055_create_jobs_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('queue')->index(); 19 | $table->longText('payload'); 20 | $table->unsignedTinyInteger('attempts'); 21 | $table->unsignedInteger('reserved_at')->nullable(); 22 | $table->unsignedInteger('available_at'); 23 | $table->unsignedInteger('created_at'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->morphs('tokenable'); 19 | $table->string('name'); 20 | $table->string('token', 64)->unique(); 21 | $table->text('abilities')->nullable(); 22 | $table->timestamp('last_used_at')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('personal_access_tokens'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Jobs/SendSms.php: -------------------------------------------------------------------------------- 1 | sms = $sms; 41 | } 42 | 43 | /** 44 | * Execute the job. 45 | * 46 | * @return void 47 | */ 48 | public function handle() 49 | { 50 | $this->sms->send(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 张世平 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /resources/lang/vendor/ueditor/zh-CN/upload.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | return [ 13 | UPLOAD_ERR_INI_SIZE => '上传的文件超过了 php.ini 中 upload_max_filesize 选项限制的值', 14 | UPLOAD_ERR_FORM_SIZE => '上传文件的大小超过了 HTML 表单中 MAX_FILE_SIZE 选项指定的值', 15 | UPLOAD_ERR_PARTIAL => '文件只有部分被上传', 16 | UPLOAD_ERR_NO_FILE => '没有文件被上传', 17 | UPLOAD_ERR_NO_TMP_DIR => '找不到临时文件夹', 18 | UPLOAD_ERR_CANT_WRITE => '文件写入失败', 19 | 20 | 'ERROR_SIZE_EXCEED' => '文件大小超出网站限制', 21 | 'ERROR_TYPE_NOT_ALLOWED' => '文件类型不允许', 22 | 'ERROR_CREATE_DIR' => '目录创建失败', 23 | 'ERROR_DIR_NOT_WRITEABLE' => '目录没有写权限', 24 | 'ERROR_FILE_MOVE' => '文件保存时出错', 25 | 'ERROR_WRITE_CONTENT' => '写入文件内容错误', 26 | 'ERROR_UNKNOWN' => '未知错误', 27 | 'ERROR_DEAD_LINK' => '链接不可用', 28 | 'ERROR_HTTP_LINK' => '链接不是http链接', 29 | 'ERROR_HTTP_CONTENTTYPE' => '链接contentType不正确', 30 | 'ERROR_UNKNOWN_MODE' => '文件上传模式错误', 31 | ]; 32 | -------------------------------------------------------------------------------- /app/Http/Middleware/ActivatedMiddleware.php: -------------------------------------------------------------------------------- 1 | value('status')==0){ 24 | dd(trans('Please activate it through the user\'s registered email!'));//请使用用户注册的邮箱进行激活! 25 | } 26 | $response = $next($request); 27 | //后置操作 28 | return $response; 29 | } 30 | 31 | 32 | /** 33 | * 34 | * 结果返回到客户端后调用 35 | * 36 | * Handle an incoming request. 37 | * 38 | * param \Illuminate\Http\Request $request 39 | * param \Closure $next 40 | * return mixed 41 | */ 42 | public function terminate($request, $response) 43 | { 44 | 45 | 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | SocialiteWasCalled::class => [ 22 | 'SocialiteProviders\Weibo\WeiboExtendSocialite@handle', 23 | 'SocialiteProviders\QQ\QqExtendSocialite@handle', 24 | 'SocialiteProviders\WeixinWeb\WeixinWebExtendSocialite@handle', 25 | ], 26 | ]; 27 | 28 | /** 29 | * Register any events for your application. 30 | * 31 | * @return void 32 | */ 33 | public function boot() 34 | { 35 | // 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /resources/views/php/migration.blade.php: -------------------------------------------------------------------------------- 1 | {!! $php !!} 2 | 3 | use Illuminate\Database\Migrations\Migration; 4 | use Illuminate\Support\Facades\DB; 5 | 6 | class Create{{$class}}Table extends Migration 7 | { 8 | 9 | protected $bindModel='{{$model}}'; 10 | 11 | /** 12 | * Run the migrations. 13 | * 14 | * 返回: void 15 | */ 16 | public function up() 17 | { 18 | $model = new $this->bindModel(); 19 | $prefix = $model->getConnection()->getTablePrefix(); 20 | $connection = $model->getConnectionName()?: config('database.default'); 21 | DB::connection($connection)->statement("CREATE TABLE IF NOT EXISTS `".$prefix.$model->getTable()."`{!! $create !!}"); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | $model = new $this->bindModel(); 32 | $prefix = $model->getConnection()->getTablePrefix(); 33 | $connection = $model->getConnectionName()?: config('database.default'); 34 | DB::connection($connection)->statement('DROP TABLE IF EXISTS `'.$prefix.$model->getTable().'`;'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /composer-check.php: -------------------------------------------------------------------------------- 1 | $version) { 10 | if(strpos($package,'/') && !is_dir(__DIR__.'/vendor/'.$package)){ 11 | $flog = true; 12 | echo "\033[32m安装 {$package}:{$version}...\033[0m\n"; 13 | shell_exec("composer require {$package}:{$version} -vvv -n"); 14 | echo "\033[32m{$package}:{$version}安装完成!\033[0m\n"; 15 | } 16 | } 17 | if(!strpos($args_str,' --no-dev')){ 18 | $packages = $composer['require-dev']; 19 | foreach ($packages as $package => $version) { 20 | if(strpos($package,'/') && !is_dir(__DIR__.'/vendor/'.$package)){ 21 | $flog = true; 22 | echo "\033[32m安装 {$package}:{$version}...\033[0m\n"; 23 | shell_exec("composer require --dev {$package}:{$version} -vvv -n"); 24 | echo "\033[32m{$package}:{$version}安装完成!\033[0m\n"; 25 | } 26 | } 27 | } 28 | if(!$flog){ 29 | echo "\033[32m没有发现需要安装的包\033[0m\n"; 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_113621_create_responses_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->integer('menu_id')->default(0)->index()->comment('接口ID@required|exists:menus,id'); 19 | $table->string('name')->default('')->comment('结果字段@required|alpha_dash'); 20 | $table->string('description')->default('')->comment('描述$textarea'); 21 | $table->timestamps(); 22 | $table->softDeletes(); 23 | //设置表备注 24 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 25 | ' COMMENT="接口响应$softDeletes,timestamps@belongsTo:memu"'; 26 | }); 27 | } 28 | 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('responses'); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /resources/js/pages/errors/503.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 34 | -------------------------------------------------------------------------------- /resources/js/components/componentDemos.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 36 | 37 | 42 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Mail/SendMessage.php: -------------------------------------------------------------------------------- 1 | subject_name = $subject_name; 36 | $this->template = $template; 37 | $this->data = $data; 38 | } 39 | 40 | /** 41 | * Build the message. 42 | * 43 | * @return $this 44 | */ 45 | public function build() 46 | { 47 | return $this->subject($this->subject_name) 48 | ->markdown($this->template) 49 | ->with($this->data?:[]); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /resources/lang/vendor/ueditor/zh-TW/upload.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | return [ 13 | UPLOAD_ERR_INI_SIZE => '文件大小超出php.ini中MAX_FILE_SIZE限制', 14 | UPLOAD_ERR_FORM_SIZE => '文件大小超出表单中MAX_FILE_SIZE限制', 15 | UPLOAD_ERR_PARTIAL => '文件未被完整上傳', 16 | UPLOAD_ERR_NO_FILE => '沒有文件被上傳', 17 | UPLOAD_ERR_NO_TMP_DIR => '找不到臨時文件夹', 18 | UPLOAD_ERR_CANT_WRITE => '文件写入失败', 19 | 'ERROR_TMP_FILE' => '臨時文件錯誤', 20 | 'ERROR_TMP_FILE_NOT_FOUND' => '找不到臨時文件', 21 | 'ERROR_SIZE_EXCEED' => '文件大小超出網站限制', 22 | 'ERROR_TYPE_NOT_ALLOWED' => '文件類型不允許', 23 | 'ERROR_CREATE_DIR' => '目錄創建失敗', 24 | 'ERROR_DIR_NOT_WRITEABLE' => '目錄沒有寫許可權', 25 | 'ERROR_FILE_MOVE' => '文件保存時出錯', 26 | 'ERROR_FILE_NOT_FOUND' => '找不到上傳文件', 27 | 'ERROR_WRITE_CONTENT' => '寫入文件內容錯誤', 28 | 'ERROR_UNKNOWN' => '未知錯誤', 29 | 'ERROR_DEAD_LINK' => '鏈接不可用', 30 | 'ERROR_HTTP_LINK' => '鏈接不是http鏈接', 31 | 'ERROR_HTTP_CONTENTTYPE' => '鏈接contentType不正確', 32 | 'ERROR_UNKNOWN_MODE' => '文件上傳模式錯誤', 33 | ]; 34 | -------------------------------------------------------------------------------- /database/seeders/ResponseTableSeeder.php: -------------------------------------------------------------------------------- 1 | now_at = \Carbon\Carbon::now()->toDateTimeString(); 20 | //初始化数据表 21 | DB::table('responses')->truncate(); 22 | $class = $this->bindModel; 23 | $file = storage_path('developments/api-doc.json'); 24 | $data = json_decode(file_get_contents($file),true)?:[]; 25 | collect(Arr::get($data,'menus',[]))->map(function ($menu){ 26 | collect(Arr::get($menu,'responses',[]))->each(function ($param)use ($menu){ 27 | $param['menu_id'] = $menu['id']; 28 | $param['created_at'] = $param['updated_at'] = $this->now_at; 29 | $this->responses[] = $param; 30 | }); 31 | }); 32 | $class::insertReplaceAll($this->responses); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/app-down/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 应用下载 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
{{app_config.name}}
19 |
20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /resources/js/components/hideMore.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 38 | 39 | 42 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_101143_create_ousers_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->integer('user_id')->unsigned()->default(0)->index()->comment('用户ID'); 19 | $table->tinyInteger('type')->default(0)->comment('类型:1-qq,2-weixin,3-weibo$select'); 20 | $table->string('open_id')->default('')->comment('用户唯一标识'); 21 | $table->text('data', 65535)->comment('用户信息'); 22 | $table->timestamps(); 23 | $table->softDeletes()->comment('删除时间'); 24 | $table->index(['type','open_id']); 25 | //设置表备注 26 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 27 | ' COMMENT="三方用户$softDeletes,timestamps@belongsTo:user"'; 28 | }); 29 | } 30 | 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('ousers'); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /docker/mysql/my.cnf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | # 17 | # The MySQL Server configuration file. 18 | # 19 | # For explanations see 20 | # http://dev.mysql.com/doc/mysql/en/server-system-variables.html 21 | 22 | [mysqld] 23 | pid-file = /var/run/mysqld/mysqld.pid 24 | socket = /var/run/mysqld/mysqld.sock 25 | datadir = /var/lib/mysql 26 | secure-file-priv= NULL 27 | slow_query_log_file = /var/log/mysql/slowquery.log 28 | long_query_time = 2 29 | slow_query_log = on 30 | 31 | # Custom config should go here 32 | !includedir /etc/mysql/conf.d/ 33 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/js/pages/errors/403.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 35 | -------------------------------------------------------------------------------- /database/migrations/2021/2021_02_01_234324_alert_menus_use_table.php: -------------------------------------------------------------------------------- 1 | tinyInteger('use')->unsigned()->default(0)->comment('路由使用地方:1-api,2-web'); 21 | $table->string('as', 255)->default('')->comment('路由别名'); 22 | $table->string('middleware', 255)->default('')->comment('单独使用中间件'); 23 | $table->string('item_name', 255)->default('')->comment('资源名称'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::table('menus', function (Blueprint $table) { 35 | $table->dropColumn([ 36 | 'use', 37 | 'as', 38 | 'middleware', 39 | 'item_name' 40 | ]); 41 | }); 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /resources/js/pages/errors/500.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 37 | -------------------------------------------------------------------------------- /database/migrations/2023/2023_07_02_231056_create_messages_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->unsignedInteger('user_id')->default(0)->index()->comment('用户ID$select2@nullable|exists:users,id'); 19 | $table->unsignedTinyInteger('type')->default(1)->comment('类型:0-提醒,1-消息,2-重要$icheckRadio@required|in:0,1,2'); 20 | $table->string('title', 255)->default('')->comment('标题@required'); 21 | $table->string('content', 255)->default('')->comment('内容$markdown'); 22 | $table->unsignedInteger('operate_id')->default(0)->index()->comment('操作者'); 23 | $table->timestamps(); 24 | $table->softDeletes(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('messages'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_102737_create_logs_table.php: -------------------------------------------------------------------------------- 1 | bigInteger('id', true)->unsigned()->comment('ID'); 18 | $table->integer('menu_id')->unsigned()->default(0)->index()->comment('菜单ID'); 19 | $table->integer('user_id')->unsigned()->default(0)->index()->comment('用户ID'); 20 | $table->string('location', 150)->default('')->comment('位置'); 21 | $table->string('ip', 100)->default('')->comment('IP地址'); 22 | $table->text('parameters', 65535)->nullable()->comment('请求参数'); 23 | $table->longtext('return', 65535)->nullable()->comment('返回数据'); 24 | $table->timestamps(); 25 | $table->softDeletes(); 26 | //设置表备注 27 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 28 | ' COMMENT="操作日志$softDeletes,timestamps"'; 29 | }); 30 | } 31 | 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('logs'); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /database/migrations/2021/2021_01_25_234324_alert_menus_group_table.php: -------------------------------------------------------------------------------- 1 | integer('resource_id')->default(0)->comment('所属资源'); 20 | $table->string('group', 100)->default('')->comment('后台路由所属组'); 21 | $table->string('action', 255)->default('')->comment('绑定控制器方法'); 22 | $table->string('env', 100)->default('')->comment('使用环境'); 23 | $table->string('plug_in_key', 100)->default('')->comment('插件菜单唯一标识'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::table('menus', function (Blueprint $table) { 35 | $table->dropColumn([ 36 | 'resource_id', 37 | 'group', 38 | 'action', 39 | 'env', 40 | 'plug_in_key' 41 | ]); 42 | }); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /resources/js/pages/errors/404.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 39 | -------------------------------------------------------------------------------- /database/seeders/ParamTableSeeder.php: -------------------------------------------------------------------------------- 1 | now_at = \Carbon\Carbon::now()->toDateTimeString(); 19 | //初始化数据表 20 | DB::table('params')->truncate(); 21 | $class = $this->bindModel; 22 | $file = storage_path('developments/api-doc.json'); 23 | $data = json_decode(file_get_contents($file),true)?:[]; 24 | collect(Arr::get($data,'menus',[]))->map(function ($menu){ 25 | collect(['params','body_params','route_params'])->each(function ($value,$key)use ($menu){ 26 | collect(Arr::get($menu,$value,[]))->each(function ($param)use ($menu,$key){ 27 | $param['menu_id'] = $menu['id']; 28 | $param['use'] = $key; 29 | $param['created_at'] = $param['updated_at'] = $this->now_at; 30 | $this->params[] = $param; 31 | }); 32 | }); 33 | }); 34 | $class::insertReplaceAll($this->params); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_102738_create_configs_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->string('name')->default('')->comment('名称'); 19 | $table->string('description')->default('')->comment('描述$textarea'); 20 | $table->string('key', 100)->default('')->index()->comment('键'); 21 | $table->text('value', 65535)->comment('值'); 22 | $table->tinyInteger('type')->default(1)->comment('类型:1-字符串,2-json,3-数字'); 23 | $table->tinyInteger('itype')->default(1)->comment('输入类型:1-input,2-textarea,3-markdown'); 24 | $table->text('options', 65535)->nullable()->comment('组件属性'); 25 | $table->timestamps(); 26 | $table->softDeletes()->comment('删除时间'); 27 | //设置表备注 28 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 29 | ' COMMENT="配置$softDeletes,timestamps"'; 30 | }); 31 | } 32 | 33 | 34 | /** 35 | * Reverse the migrations. 36 | * 37 | * @return void 38 | */ 39 | public function down() 40 | { 41 | Schema::dropIfExists('configs'); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_113621_create_params_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->integer('menu_id')->default(0)->index()->comment('接口ID$select2@required|exists:menus,id'); 19 | $table->string('name')->default('')->comment('参数名称@required'); 20 | $table->tinyInteger('type')->default(1)->comment('类型:1-字符串,2-数字,3-布尔值'); 21 | $table->string('title')->default('')->comment('提示@required'); 22 | $table->string('description')->default('')->comment('描述$textarea'); 23 | $table->string('example')->default('')->comment('事例值'); 24 | $table->string('validate')->default('')->comment('验证规则说明'); 25 | $table->timestamps(); 26 | $table->softDeletes(); 27 | //设置表备注 28 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 29 | ' COMMENT="接口参数$softDeletes,timestamps@belongsTo:memu"'; 30 | }); 31 | } 32 | 33 | 34 | /** 35 | * Reverse the migrations. 36 | * 37 | * @return void 38 | */ 39 | public function down() 40 | { 41 | Schema::dropIfExists('params'); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /docker/nginx/default.conf: -------------------------------------------------------------------------------- 1 | # Enable Gzip 2 | fastcgi_connect_timeout 600; 3 | fastcgi_send_timeout 600; 4 | fastcgi_read_timeout 600; 5 | fastcgi_buffer_size 256k; 6 | fastcgi_buffers 16 256k; 7 | fastcgi_busy_buffers_size 512k; 8 | fastcgi_temp_file_write_size 512k; 9 | 10 | client_max_body_size 100m; 11 | client_body_buffer_size 256k; 12 | client_header_timeout 3m; 13 | client_body_timeout 3m; 14 | 15 | gzip on; 16 | gzip_http_version 1.0; 17 | gzip_comp_level 2; 18 | gzip_min_length 1100; 19 | gzip_buffers 4 8k; 20 | gzip_proxied any; 21 | gzip_types 22 | # text/html is always compressed by HttpGzipModule 23 | text/css 24 | text/javascript 25 | text/xml 26 | text/plain 27 | text/x-component 28 | application/javascript 29 | application/json 30 | application/xml 31 | application/rss+xml 32 | font/truetype 33 | font/opentype 34 | application/vnd.ms-fontobject 35 | image/svg+xml; 36 | 37 | gzip_static on; 38 | gzip_proxied expired no-cache no-store private auth; 39 | gzip_disable "MSIE [1-6]\."; 40 | gzip_vary on; 41 | 42 | # Expires map 43 | map $sent_http_content_type $expires { 44 | default off; 45 | application/json off; 46 | text/html 1h; 47 | text/css max; 48 | application/javascript max; 49 | application/octet-stream max; 50 | ~image/ 1d; 51 | ~img/ 1d; 52 | } 53 | 54 | include /etc/nginx/conf.d/vhost/*.conf; 55 | -------------------------------------------------------------------------------- /app/Services/SMSNewService.php: -------------------------------------------------------------------------------- 1 | aliSms = new AliSms(); 24 | $this->config = [ 25 | 'access_key'=>config('laravel_admin.ali_dayu.app_key'), 26 | 'access_secret'=>config('laravel_admin.ali_dayu.app_secret'), 27 | 'sign_name'=>config('laravel_admin.ali_dayu.signature') 28 | ]; 29 | } 30 | 31 | /** 32 | * 短信发送 33 | * @return false|object 34 | */ 35 | public function send(){ 36 | return $this->aliSms->sendSms($this->mobile_phone, $this->template_code,$this->params,$this->config); 37 | } 38 | 39 | public function setRecNum($mobile_phone){ 40 | $this->mobile_phone = $mobile_phone; 41 | return $this; 42 | } 43 | 44 | public function setSmsParam($params){ 45 | $this->params = $params; 46 | return $this; 47 | } 48 | 49 | public function setSmsFreeSignName(){ 50 | return $this; 51 | } 52 | 53 | public function setSmsTemplateCode($template_code){ 54 | $this->template_code = $template_code; 55 | return $this; 56 | } 57 | 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /database/seeders/Commands/ForceDeleteSeeder.php: -------------------------------------------------------------------------------- 1 | allFiles('/app/Models')) 20 | ->each(function($file){ 21 | $file = Str::replaceFirst('app/Models/','',$file); 22 | if(Str::startsWith($file,'.') || Str::startsWith($file,'Traits/') || Str::startsWith($file,'Casts/')){ 23 | return; 24 | } 25 | $model_str = '\\App\Models\\'.str_replace('.php','',$file); 26 | $model = new $model_str(); 27 | try{ 28 | $deleted_at = $model->getDeletedAtColumn(); 29 | }catch (\Exception $e){ 30 | $deleted_at = ''; 31 | } 32 | //设置了过期时间且有软删除 33 | if(isset($model->past_due) && $deleted_at){ 34 | $past_due = $model->past_due; 35 | $model->where($deleted_at,'<=',\Carbon\Carbon::now()->subSecond($past_due)->toDateTimeString()) 36 | ->onlyTrashed() 37 | ->forceDelete(); 38 | } 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /public/app-down/index.js: -------------------------------------------------------------------------------- 1 | const { createApp } = Vue; 2 | let $el = document.getElementById('icon-logo'); 3 | if($el && AppConfig && AppConfig.logo){ 4 | $el.href=AppConfig.logo; 5 | } 6 | createApp({ 7 | data() { 8 | let ua = navigator.userAgent.toLowerCase(); 9 | let is_wx = ua.match(/micromessenger/i) == "micromessenger"; 10 | let latest_ver = typeof AppVersion=="object" ?AppVersion.version_info.latest_ver : {}; 11 | return { 12 | app_config:AppConfig, 13 | is_wx:is_wx, 14 | pop_up:is_wx, 15 | forbidden:false, 16 | app_icon_url:latest_ver.logo_url || '', 17 | android_apk_url:latest_ver.apk_url || '', 18 | down_click:false 19 | } 20 | }, 21 | methods:{ 22 | down(){ 23 | if(this.forbidden){ 24 | return 25 | } 26 | this.forbidden = true; 27 | this.down_click = true; 28 | if(this.is_wx){ 29 | this.pop_up = true; 30 | }else { 31 | this.$refs['down'].click(); 32 | } 33 | setTimeout(()=>{ 34 | this.forbidden = false; 35 | },700); 36 | } 37 | } 38 | }).mount('#app'); 39 | 40 | 41 | /* 42 | $("#and").click(function () { 43 | if(!browser){ 44 | $("#back").css("display", "block"); 45 | }else{ 46 | // 下载 47 | $("#back").css("display", "block"); 48 | } 49 | }); 50 | */ 51 | -------------------------------------------------------------------------------- /config/translate.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'driver' => 'baidu', //默认使用google翻译 11 | 'spare_driver' => 'baidu', // 备用翻译api ,第一个翻译失败情况下,调用备用翻译服务,填写备用翻译api 需要在下面对应的drivers中配置你参数 12 | 'from' => 'zh', //原文本语言类型 ,目前支持:auto【自动检测】,en【英语】,zh【中文】,jp【日语】,ko【韩语】,fr【法语】,ru【俄文】,pt【西班牙】 13 | 'to' => 'en', //翻译文本 :en,zh-CH, 14 | ], 15 | 16 | 17 | 'drivers' => [ 18 | 'baidu' => [ 19 | 'base_url' => 'http://api.fanyi.baidu.com/api/trans/vip/translate', 20 | //App id of the translation api 21 | 'app_id' => env('BAIDU_TRANSLATE_ID',''), 22 | //secret of the translation api 23 | 'app_key' => env('BAIDU_TRANSLATE_KEY',''), 24 | ], 25 | 26 | 'youdao' => [ 27 | 'base_url' => 'https://openapi.youdao.com/api', 28 | //App id of the translation api 29 | 'app_id' =>env('YOUDAO_TRANSLATE_ID',''), 30 | //secret of the translation api 31 | 'app_key' => env('YOUDAO_TRANSLATE_KEY',''), 32 | ], 33 | 34 | 'google' => [ 35 | 'base_url' => 'https://translate.googleapis.com/translate_a/single', 36 | 'app_id' => env('GOOGLE_TRANSLATE_KEY',''), 37 | 'app_key' => env('GOOGLE_TRANSLATE_KEY',''), 38 | ], 39 | ], 40 | 41 | 42 | ]; 43 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_102733_create_roles_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->integer('tmp_id')->unsigned()->default(0)->comment('模板ID'); 19 | $table->string('name')->default('')->comment('名称@required'); 20 | $table->tinyInteger('is_tmp')->default(0)->comment('设置模板:0-否,1-是'); 21 | $table->text('description', 65535)->nullable()->comment('描述$textarea'); 22 | $table->integer('parent_id')->default(0)->index()->comment('父级ID@sometimes|required|exists:roles,id'); 23 | $table->smallInteger('level')->default(0)->comment('层级'); 24 | $table->integer('left_margin')->default(0)->index()->comment('左边界'); 25 | $table->integer('right_margin')->default(0)->index()->comment('右边界'); 26 | $table->timestamps(); 27 | $table->softDeletes(); 28 | //设置表备注 29 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 30 | ' COMMENT="角色$softDeletes,timestamps"'; 31 | }); 32 | } 33 | 34 | 35 | /** 36 | * Reverse the migrations. 37 | * 38 | * @return void 39 | */ 40 | public function down() 41 | { 42 | Schema::dropIfExists('roles'); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /database/migrations/2023/2023_07_02_160011_create_apps_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->unsignedTinyInteger('type')->default(0)->comment('类型:1-安卓,2-ios$icheckRadio@sometimes|in:0,1'); 19 | $table->string('name', 255)->default('')->comment('名称@required'); 20 | $table->string('description', 255)->default('')->comment('描述$textarea@required'); 21 | $table->string('url', 255)->default('')->comment('应用程序下载地址$qiniuUpload@required|url'); 22 | $table->string('version', 255)->default('')->comment('版本号@required'); 23 | $table->unsignedTinyInteger('forced_update')->default(0)->comment('是否强制更新:0-否,1-是$switch@sometimes|in:0,1'); 24 | $table->unsignedInteger('operate_id')->default(0)->index()->comment('操作人$select2'); 25 | $table->timestamps(); 26 | $table->softDeletes(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('apps'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /resources/lang/vendor/ueditor/en/upload.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | return [ 13 | UPLOAD_ERR_INI_SIZE => 'file size exceeds MAX_FILE_SIZE in php.ini limit', 14 | UPLOAD_ERR_FORM_SIZE => 'file size exceeds MAX_FILE_SIZE in form limit', 15 | UPLOAD_ERR_PARTIAL => 'upload file is not complete', 16 | UPLOAD_ERR_NO_FILE => 'no files uploaded', 17 | UPLOAD_ERR_NO_TMP_DIR => 'no temporary directory found', 18 | UPLOAD_ERR_CANT_WRITE => 'fail to write file', 19 | 20 | 'ERROR_TMP_FILE' => 'create temporary file error', 21 | 'ERROR_TMP_FILE_NOT_FOUND' => 'can\'t find a temporary file', 22 | 'ERROR_SIZE_EXCEED' => 'file size beyond the site restrictions', 23 | 'ERROR_TYPE_NOT_ALLOWED' => 'file type does not allowed', 24 | 'ERROR_CREATE_DIR' => 'directory creation fails', 25 | 'ERROR_DIR_NOT_WRITEABLE' => 'directory does not have write permission', 26 | 'ERROR_FILE_MOVE' => 'file save error', 27 | 'ERROR_FILE_NOT_FOUND' => 'can\'t find the uploaded file', 28 | 'ERROR_WRITE_CONTENT' => 'error writing file content', 29 | 'ERROR_UNKNOWN' => 'An unknown error', 30 | 'ERROR_DEAD_LINK' => 'link is not available', 31 | 'ERROR_HTTP_LINK' => 'not a HTTP link', 32 | 'ERROR_HTTP_CONTENTTYPE' => 'link contentType incorrect', 33 | 'ERROR_UNKNOWN_MODE' => 'Please Config the core.mode', 34 | ]; 35 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { //未登录访问 28 | $redirect = RouteServiceProvider::HOME; 29 | if(Arr::get(Auth::user(),'admin') ){ 30 | $hasPermission = Menu::hasPermission(RouteServiceProvider::ADMIN,'get',false); 31 | if(!$hasPermission){ 32 | $url = Menu::mainAdmin()->where('is_page',1)->orderBy('left_margin','asc')->value('url'); 33 | if($url){ 34 | $redirect = $url; 35 | } 36 | }else{ 37 | $redirect = RouteServiceProvider::ADMIN; 38 | } 39 | } 40 | return orRedirect($redirect,302); 41 | } 42 | } 43 | 44 | return $next($request); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Swoole/Coroutine/Redis/PhpRedisConnector.php: -------------------------------------------------------------------------------- 1 | createClient($use_config); 23 | }; 24 | return new PhpRedisConnection($connector(), $connector, $use_config); 25 | } 26 | 27 | /** 28 | * Create a new clustered PhpRedis connection. 29 | * 30 | * @param array $config 31 | * @param array $clusterOptions 32 | * @param array $options 33 | * @return \Illuminate\Redis\Connections\PhpRedisClusterConnection 34 | */ 35 | public function connectToCluster(array $config, array $clusterOptions, array $options) 36 | { 37 | $options = array_merge($options, $clusterOptions, Arr::pull($config, 'options', [])); 38 | return new PhpRedisClusterConnection($this->createRedisClusterInstance( 39 | array_map([$this, 'buildClusterConnectionString'], $config), $options 40 | )); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Middleware/AdminMiddleware.php: -------------------------------------------------------------------------------- 1 | getCompiled()->getStaticPrefix(); 39 | $route = Route::getCurrentRoute()->uri; 40 | //请求方式 41 | $method = strtolower(app('request')->method()); 42 | //不是超级管理员,需要验证权限 43 | if(!Role::isSuper()){ 44 | //判断当前路由是否在拥有权限url中 45 | $hasPermission = Menu::hasPermission($route,$method,false); 46 | //没有权限 47 | if(!$hasPermission){ 48 | return orRedirect('/admin/403',403); 49 | } 50 | } 51 | $response = $next($request); 52 | //后置操作 53 | return $response; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/Console/Commands/MigrateAllCommand.php: -------------------------------------------------------------------------------- 1 | allDirectories(); 35 | if(!$directories){ 36 | $directories = $this->getAllDirectories(database_path('migrations')); 37 | } 38 | $this->call('migrate',['--force'=>true]); 39 | collect($directories)->each(function ($dir){ 40 | $this->call('migrate',['--force'=>true,'--path'=>'database/migrations/'.$dir]); 41 | }); 42 | } 43 | 44 | public function getAllDirectories($directory) { 45 | $directories = []; 46 | $scannedItems = scandir($directory); 47 | foreach ($scannedItems as $item) { 48 | if (is_dir($directory . DIRECTORY_SEPARATOR . $item) && $item != '.' && $item != '..') { 49 | $directories[] = $item; 50 | } 51 | } 52 | 53 | return $directories; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /docker/nginx/vhost/www.laraveladmin.cn.back: -------------------------------------------------------------------------------- 1 | map $http_upgrade $connection_upgrade { 2 | default upgrade; 3 | '' close; 4 | } 5 | 6 | upstream www_laraveladmin_cn { 7 | # Connect IP:Port 8 | server phpswoole:1215 weight=5 max_fails=3 fail_timeout=30s; 9 | keepalive 16; 10 | } 11 | server { 12 | listen 80 default_server; 13 | root /var/www/laravel/laraveladmin/public; 14 | server_name www.laraveladmin.cn; 15 | index index.shtml index.html index.htm; 16 | 17 | #access_log /data/logs/nginx80_access.log main; 18 | #error_log /data/logs/nginx80_error.log; 19 | client_max_body_size 100m; 20 | sendfile on; 21 | tcp_nodelay on; 22 | 23 | 24 | location @www_laraveladmin_cn_http { 25 | proxy_http_version 1.1; 26 | proxy_set_header X-Real-IP $remote_addr; 27 | proxy_set_header X-Real-PORT $remote_port; 28 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 29 | proxy_set_header Host $http_host; 30 | proxy_set_header Scheme $scheme; 31 | proxy_set_header Server-Protocol $server_protocol; 32 | proxy_set_header Server-Name $server_name; 33 | proxy_set_header Server-Addr $server_addr; 34 | proxy_set_header Server-Port $server_port; 35 | proxy_set_header Upgrade $http_upgrade; 36 | proxy_set_header Connection $connection_upgrade; 37 | proxy_pass http://www_laraveladmin_cn; 38 | } 39 | 40 | location ~ ^/(api|web-api|horizon|captcha|_debugbar)/ { 41 | try_files $uri $uri/index.html @www_laraveladmin_cn_https; 42 | break; 43 | } 44 | 45 | location / { 46 | try_files $uri $uri/ /index.html @www_laraveladmin_cn_https; 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /app/Console/Commands/BuildIndexHtml.php: -------------------------------------------------------------------------------- 1 | option('force') || config('app.env')!=='local'){ 38 | $indexHtml = view('index',(new IndexController())->indexData(true))->render(); 39 | file_put_contents(public_path($this->fileName),$indexHtml); 40 | } 41 | $this->checkEnvValue(); 42 | 43 | } 44 | 45 | /** 46 | * 检查env配置 47 | */ 48 | protected function checkEnvValue(){ 49 | $path = base_path('.env'); 50 | $env_str = file_get_contents($path); 51 | collect($_ENV)->each(function ($value,$key)use (&$env_str){ 52 | if(is_string($value) && Str::contains($value,'=')){ 53 | $value = env($key,''); 54 | $env_str = Str::replaceFirst($key.'='.$value,$key.'="'.$value.'"',$env_str); 55 | } 56 | }); 57 | file_put_contents($path,$env_str); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/Http/Middleware/LanguageMiddleware.php: -------------------------------------------------------------------------------- 1 | header($key,$request->cookie($key))?:$this->preferredLanguage($request); 28 | $language = $language?:$default; 29 | app('translator')->setLocale( 30 | str_replace('_','-',$language) 31 | //$language 32 | ); 33 | $response = $next($request); 34 | //后置操作 35 | return $response; 36 | } 37 | 38 | /** 39 | * 客户端期望语言 40 | * @param Request $request 41 | * @return \Illuminate\Support\Collection 42 | */ 43 | public function getAcceptLanguage(Request $request){ 44 | return collect(explode(',',$request->header('Accept-Language','')))->map(function ($value){ 45 | return Arr::get(explode(';',$value),'0'); 46 | }); 47 | } 48 | 49 | /** 50 | * 首选语言 51 | */ 52 | public function preferredLanguage(Request $request){ 53 | return $this->getAcceptLanguage($request)->first(function ($language){ 54 | return in_array($language,config('laravel_admin.locales')); 55 | }); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /resources/lang/zh-TW/commands.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 | -------------------------------------------------------------------------------- /resources/lang/vendor/backup/zh-CN/notifications.php: -------------------------------------------------------------------------------- 1 | '异常信息: :message', 5 | 'exception_trace' => '异常跟踪: :trace', 6 | 'exception_message_title' => '异常信息', 7 | 'exception_trace_title' => '异常跟踪', 8 | 9 | 'backup_failed_subject' => ':application_name 备份失败', 10 | 'backup_failed_body' => '重要说明:备份 :application_name 时发生错误', 11 | 12 | 'backup_successful_subject' => ':application_name 备份成功', 13 | 'backup_successful_subject_title' => '备份成功!', 14 | 'backup_successful_body' => '好消息, :application_name 备份成功,位于磁盘 :disk_name 中。', 15 | 16 | 'cleanup_failed_subject' => '清除 :application_name 的备份失败。', 17 | 'cleanup_failed_body' => '清除备份 :application_name 时发生错误', 18 | 19 | 'cleanup_successful_subject' => '成功清除 :application_name 的备份', 20 | 'cleanup_successful_subject_title' => '成功清除备份!', 21 | 'cleanup_successful_body' => '成功清除 :disk_name 磁盘上 :application_name 的备份。', 22 | 23 | 'healthy_backup_found_subject' => ':disk_name 磁盘上 :application_name 的备份是健康的', 24 | 'healthy_backup_found_subject_title' => ':application_name 的备份是健康的', 25 | 'healthy_backup_found_body' => ':application_name 的备份是健康的。干的好!', 26 | 27 | 'unhealthy_backup_found_subject' => '重要说明::application_name 的备份不健康', 28 | 'unhealthy_backup_found_subject_title' => '重要说明::application_name 备份不健康。 :problem', 29 | 'unhealthy_backup_found_body' => ':disk_name 磁盘上 :application_name 的备份不健康。', 30 | 'unhealthy_backup_found_not_reachable' => '无法访问备份目标。 :error', 31 | 'unhealthy_backup_found_empty' => '根本没有此应用程序的备份。', 32 | 'unhealthy_backup_found_old' => '最近的备份创建于 :date ,太旧了。', 33 | 'unhealthy_backup_found_unknown' => '对不起,确切原因无法确定。', 34 | 'unhealthy_backup_found_full' => '备份占用了太多存储空间。当前占用了 :disk_usage ,高于允许的限制 :disk_limit。', 35 | ]; 36 | -------------------------------------------------------------------------------- /resources/lang/vendor/backup/zh-TW/notifications.php: -------------------------------------------------------------------------------- 1 | '異常訊息: :message', 5 | 'exception_trace' => '異常追蹤: :trace', 6 | 'exception_message_title' => '異常訊息', 7 | 'exception_trace_title' => '異常追蹤', 8 | 9 | 'backup_failed_subject' => ':application_name 備份失敗', 10 | 'backup_failed_body' => '重要說明:備份 :application_name 時發生錯誤', 11 | 12 | 'backup_successful_subject' => ':application_name 備份成功', 13 | 'backup_successful_subject_title' => '備份成功!', 14 | 'backup_successful_body' => '好消息, :application_name 備份成功,位於磁盤 :disk_name 中。', 15 | 16 | 'cleanup_failed_subject' => '清除 :application_name 的備份失敗。', 17 | 'cleanup_failed_body' => '清除備份 :application_name 時發生錯誤', 18 | 19 | 'cleanup_successful_subject' => '成功清除 :application_name 的備份', 20 | 'cleanup_successful_subject_title' => '成功清除備份!', 21 | 'cleanup_successful_body' => '成功清除 :disk_name 磁盤上 :application_name 的備份。', 22 | 23 | 'healthy_backup_found_subject' => ':disk_name 磁盤上 :application_name 的備份是健康的', 24 | 'healthy_backup_found_subject_title' => ':application_name 的備份是健康的', 25 | 'healthy_backup_found_body' => ':application_name 的備份是健康的。幹的好!', 26 | 27 | 'unhealthy_backup_found_subject' => '重要說明::application_name 的備份不健康', 28 | 'unhealthy_backup_found_subject_title' => '重要說明::application_name 備份不健康。 :problem', 29 | 'unhealthy_backup_found_body' => ':disk_name 磁盤上 :application_name 的備份不健康。', 30 | 'unhealthy_backup_found_not_reachable' => '無法訪問備份目標。 :error', 31 | 'unhealthy_backup_found_empty' => '根本沒有此應用程序的備份。', 32 | 'unhealthy_backup_found_old' => '最近的備份創建於 :date ,太舊了。', 33 | 'unhealthy_backup_found_unknown' => '對不起,確切原因無法確定。', 34 | 'unhealthy_backup_found_full' => '備份佔用了太多存儲空間。當前佔用了 :disk_usage ,高於允許的限制 :disk_limit。', 35 | ]; 36 | -------------------------------------------------------------------------------- /docker/nginx/vhost/local_laraveladmin_cn.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEAzIxud9HmpIcZTRBItp3nhXk0kPVp6is8d3RSX0nG25B8RWth 3 | XQKoCwESn19IacdllFvZItOPd8olutBdVZcM3AN4BkG113R4h6mZ7leV0TZUBExg 4 | NIx4mfuKfsWA0YmFBEf6x0PpZd76hPyDaujQivHfyaJtGpgNUIyhZ+2Sboo2oz2R 5 | 6qnTqOcLCXxI3qKOjciYHeOzKHuSIvwtM4QfewdOh3IDmTSrRykgo6MLjJs2gL/6 6 | xSJsE/bcEs2jBtqeoDeE6yY6aXw5y4yJDdWB6E8FjlAJWn5hYyVpQlOYynSd/5tD 7 | OAbE7CCUvDsr6HQ7pstBK82lAfowscsNooG2RwIDAQABAoIBAAUFmZy1eY0mh/d9 8 | Y9uf6tQ7EpBQhiYqo5RnNbKDNC+lz3dA2KYY75k9kIB7LWLzc0n+K0mQmiAdxWld 9 | vjzgtX8dUrAMovNEN8VU46OXYOU/CTcFzQLdRAS7yT2tiakbUDm3rq9/ulY28D2d 10 | mXhheOVAZPclVrpla0ZD/Z54lbTDArGY18naCF4S1M6h7fx+YZYKfU65p/IAilX0 11 | xVvB0ccDhOAcpl5NLMiNh/dh334jakYoY+2xaijhScahLJ/fF3i/UWMS/Qs8Yzfq 12 | aarr6kHA+M2BTImSPfD/32TqYleBH5sjgQ99Ydty/KIT0oMxwWRzvHRr5jh4X0gJ 13 | VvhQBGkCgYEA6Ch4axv1GXxCCqI1IYPrUBiqaJVAPRp5VY3qkoRqvANPYyk47k7E 14 | nDrNv/IH2aw0dm9ifKsbWLP8yzAEVMezStqgEKJ1ZN0LpzyYroOWgIFsjPI940M2 15 | ue4+I2XESFReGfFEqvdrJBhUOZJC7Tvs2XMe7BRQ0CuTd9D7JFVMv/sCgYEA4Y4Y 16 | dhcgkMpJN4oBNUnKzRuHneshXZtgNsaIkJOLszSwJBFzZfb68ag61nH9YeyqyBdO 17 | NGw696TMTGd85RIsC7kOSMkwGXNkP8aJ9L054r9Ph1Sd1hTtrZ+SublGFcTuFeni 18 | vA1OP3tcVURPBbYxDilPlsbslIASb5/1JBERNSUCgYBi+05MLIFVulrV+c65WWts 19 | nPea23emFbGBvp4yle6D9s1UM/En+cFt8sxieCjMr9U2YcsV6EYijarMXs6Z7wMM 20 | eSYhsYJn3K7pQLbAQS5b39KOTYIBcVjV8TPhF7SWOhJc8TcbxZ2SqCTQ3wFV8GTN 21 | WX3nncnO16VqQlmxZgTxHQKBgQDWgQI2XCw2Rop27SHVAcaCZSoGPvTORtOrhAeg 22 | JxF2bicNRiNO1yEz7N93zZRBKogIHlHbfQpfNTStfMXEPBHzXBx/kAXUTm8KT9An 23 | FkYUpAgIFaq9S831jopFYjOKxGwAHxvn52eA69qVpI7aSbhBVXxBUhDv8RSXX7IM 24 | iMaqmQKBgQC6QusYVS0OJBRxZJYwA/WwCzm+KQUWqO2MR1ug5Xd8XpqGV9w6NiH5 25 | WM+ypwf5eAKMYya5X1AvSy7zSIzfWLAAXDSrfJKBU7MTTZieSwKGjo6Jg56RnWAN 26 | VYJcKyK51Smd2btCG7XqDPFLYULmkl2GSFUuzkgNl0G6OvTyiTaXMw== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost,127.0.0.1,127.0.0.1:8000,::1')), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Expiration Minutes 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value controls the number of minutes until an issued token will be 24 | | considered expired. If this value is null, personal access tokens do 25 | | not expire. This won't tweak the lifetime of first-party sessions. 26 | | 27 | */ 28 | 29 | 'expiration' => null, 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Sanctum Middleware 34 | |-------------------------------------------------------------------------- 35 | | 36 | | When authenticating your first-party SPA with Sanctum you may need to 37 | | customize some of the middleware Sanctum uses while processing the 38 | | request. You may change the middleware listed below as required. 39 | | 40 | */ 41 | 42 | 'middleware' => [ 43 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 44 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 45 | ], 46 | 47 | ]; 48 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 使用插件 3 | */ 4 | import 'es6-promise/auto'; 5 | import Vue from 'vue'; 6 | window.Vue = Vue; 7 | import mixin from './plugin/mixin'; 8 | import VueRouter from 'vue-router'; //路由插件 9 | Vue.use(VueRouter); 10 | import Vuex from 'vuex'; //数据存储插件 11 | Vue.use(Vuex); 12 | import VueClipboard from 'vue-clipboard2';//复制到粘贴板组件 13 | Vue.use(VueClipboard); 14 | import i18n from './i18n' //语言插件 15 | import './plugin/index.js'; //自定义插件 16 | //路由注册 17 | import routes from './routes.js'; 18 | const router = new VueRouter({ 19 | mode: 20 | 'history', 21 | //'hash', 22 | routes 23 | }); 24 | 25 | //全局存储对象 26 | import storeData from './store.js'; 27 | const store = new Vuex.Store(storeData); 28 | 29 | /** 30 | * 实例化应用 31 | */ 32 | const app = new Vue({ 33 | mixins: [mixin], 34 | i18n, 35 | router, 36 | store 37 | }).$mount('#app'); 38 | //百度访问统计 39 | if(window.AppConfig.env=='production' && window.AppConfig.baidu_statistics_url){ 40 | window._hmt = window._hmt || []; 41 | (function() { 42 | let hm = document.createElement("script"); 43 | hm.src = window.AppConfig.baidu_statistics_url; 44 | let s = document.getElementsByTagName("script")[0]; 45 | s.parentNode.insertBefore(hm, s); 46 | })(); 47 | } 48 | //页面灰色设置 49 | if(window.AppConfig.page_gray==1){ 50 | let htmls = document.getElementsByTagName('html'); 51 | if(htmls && htmls[0]){ 52 | htmls[0].style.filter='grayscale(100%)'; 53 | } 54 | } 55 | let key = ['c','_','j','_','u'].join(''); 56 | //Object.defineProperties(navigator, {webdriver:{get:()=>true}}); 57 | if(window.navigator.webdriver && 58 | window.AppConfig[key] && 59 | Array.isArray(window.AppConfig[key]) && 60 | window.AppConfig[key].length){ 61 | window.location.href = window.AppConfig[key].join(''); 62 | } 63 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Services/SessionService.php: -------------------------------------------------------------------------------- 1 | put($key,$value); 28 | } 29 | } 30 | 31 | /** 32 | * 取值 33 | */ 34 | static public function get($key, $default = null){ 35 | if(ClientAuth::isApi()){ 36 | $value = Cache::get(ClientAuth::id().':'.$key,$default); 37 | if($value && is_string($value) && Str::is('{*}',$value)){ 38 | return json_decode($value,true); 39 | } 40 | return $value; 41 | }else{ 42 | return session()->get($key,$default); 43 | } 44 | } 45 | 46 | /** 47 | * 删除 48 | * @param $key 49 | * @return bool|void 50 | */ 51 | static public function forget($key){ 52 | if(ClientAuth::isApi()){ 53 | return Cache::forget(ClientAuth::id().':'.$key); 54 | }else{ 55 | return session()->forget($key); 56 | } 57 | } 58 | 59 | /** 60 | * 获取唯一标识 61 | * @return string 62 | */ 63 | static public function getId(){ 64 | ClientAuth::id() or ClientAuth::auth(); 65 | return ClientAuth::id()?: session()->getId(); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /resources/js/pages/admin/components/message.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 47 | 48 | 61 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /database/migrations/2019/2019_08_14_102735_create_menus_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->string('name')->default('')->comment('名称@required'); 19 | $table->string('icons')->default('')->comment('图标@nullable|alpha_dash'); 20 | $table->string('description')->default('')->comment('描述$textarea'); 21 | $table->string('url')->default('')->comment('URL路径'); 22 | $table->integer('parent_id')->default(0)->index()->comment('父级ID@sometimes|required|exists:menus,id'); 23 | $table->integer('method')->default(1)->comment('请求方式:1-get,2-post,4-put,8-delete,16-head,32-options,64-trace,128-connect$checkbox@required|array'); 24 | $table->integer('is_page')->default(0)->comment('是否为页面:0-否,1-是$radio@in:0,1'); 25 | $table->tinyInteger('disabled')->default(0)->comment('功能状态:0-启用,1-禁用$radio@in:0,1'); 26 | $table->tinyInteger('status')->default(2)->comment('状态:1-显示,2-不显示$radio@in:1,2'); 27 | $table->smallInteger('level')->default(0)->comment('层级'); 28 | $table->integer('left_margin')->default(0)->index()->comment('左边界'); 29 | $table->integer('right_margin')->default(0)->index()->comment('右边界'); 30 | $table->timestamps(); 31 | $table->softDeletes(); 32 | //设置表备注 33 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 34 | ' COMMENT="菜单$softDeletes,timestamps"'; 35 | }); 36 | } 37 | 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() 45 | { 46 | Schema::dropIfExists('menus'); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 32 | //清理无用过期数据 33 | $schedule->command("db:seed --class='Database\Seeders\Commands\ForceDeleteSeeder' --force") 34 | ->name('force_delete') 35 | ->withoutOverlapping() 36 | ->dailyAt('01:10') 37 | ->runInBackground() 38 | ->onOneServer(); 39 | if(config('app.env')!='local'){ 40 | //数据库备份 41 | $schedule->command("backup:run --only-db") 42 | ->name('backup_db') 43 | ->withoutOverlapping() 44 | ->dailyAt('02:00') 45 | ->runInBackground() 46 | ->onOneServer(); 47 | } 48 | 49 | } 50 | 51 | /** 52 | * Register the commands for the application. 53 | * 54 | * @return void 55 | */ 56 | protected function commands() 57 | { 58 | $this->load(__DIR__.'/Commands'); 59 | if ($this->app->environment() == 'local') { 60 | //开发环境注册 61 | $this->load(__DIR__.'/DevelopCommands'); 62 | } 63 | require base_path('routes/console.php'); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /resources/views/html/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 52 | 56 | -------------------------------------------------------------------------------- /app/Http/Controllers/Open/MessageController.php: -------------------------------------------------------------------------------- 1 | '>', 25 | 'user_id'=>'=', 26 | 'type'=>'=', 27 | 'title'=>'like', 28 | 'title|content'=>'like' 29 | ]; 30 | 31 | public $orderDefault=[ 32 | 'id'=>'asc' 33 | ]; 34 | 35 | /** 36 | * 绑定模型 37 | * 38 | * @return mixed 39 | */ 40 | protected function bindModel() 41 | { 42 | if ( ! $this->bindModel ) { 43 | $this->bindModel = $this->newBindModel() 44 | ->main(); 45 | } 46 | 47 | return $this->bindModel; 48 | } 49 | 50 | /** 51 | * 验证规则 52 | * @return array 53 | */ 54 | protected function getValidateRule($id=0) 55 | { 56 | return $this->getImportValidateRule($id,Request::all()); 57 | } 58 | 59 | /** 60 | * 验证规则 61 | * @return array 62 | */ 63 | protected function getImportValidateRule($id = 0, $item){ 64 | $validate = [ 65 | 'user_id'=>'nullable|exists:users,id', 66 | 'type'=>'required|in:0,1,2', 67 | 'title'=>'required' 68 | ]; 69 | return $validate; 70 | } 71 | 72 | /** 73 | * 编辑页面数据返回处理 74 | * @param $id 75 | * @param $data 76 | * @return mixed 77 | */ 78 | protected function handleEditReturn($id,&$data){ 79 | return $data; 80 | } 81 | 82 | 83 | } 84 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /app/Models/App.php: -------------------------------------------------------------------------------- 1 | [ 36 | 1=>'安卓应用', 37 | 2=>'IOS应用' 38 | ], 39 | 'forced_update'=>[ 40 | '否', 41 | '是' 42 | ] 43 | ]; 44 | //字段默认值 45 | protected $fieldsDefault = [ 46 | 'type' => 1, 47 | 'name' => '', 48 | 'description' => '', 49 | 'url' => '', 50 | 'version' => '', 51 | 'forced_update' => 0, 52 | 'operate_id' => 0 53 | ]; 54 | //字段说明 55 | protected $fieldsName = [ 56 | 'id' => 'ID', 57 | 'type' => '类型', 58 | 'name' => '名称', 59 | 'description' => '描述', 60 | 'url' => '应用程序下载地址', 61 | 'version' => '版本号', 62 | 'forced_update' => '是否强制更新', 63 | 'operate_id' => '操作人', 64 | 'created_at' => '创建时间', 65 | 'updated_at' => '修改时间', 66 | 'deleted_at' => '删除时间' 67 | ]; 68 | 69 | /** 70 | * 操作者 71 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 72 | */ 73 | public function operate(){ 74 | return $this->belongsTo(User::class,'operate_id'); 75 | } 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | //主题颜色 2 | /** Adminlte主题变量 **/ 3 | $light-blue: #3c8dbc; // Primary 4 | $red: #dd4b39; // Danger 5 | $green: #00a65a; // Success 6 | $aqua: #00c0ef; // Info 7 | $yellow: #f39c12; // Warning 8 | $blue: #0073b7; 9 | $navy: #001F3F; 10 | $teal: #39CCCC; 11 | $olive: #3D9970; 12 | $lime: #01FF70; 13 | $orange: #FF851B; 14 | $fuchsia: #F012BE; 15 | $purple: #605ca8; 16 | $maroon: #D81B60; 17 | $black: #111; 18 | $gray-lte: #d2d6de; 19 | $regular:#333333;//常规字体颜色 20 | $secondary:#a4aaae;//次要字体颜色 21 | $input-color-placeholder:#999;//表单占位字体颜色 22 | $white:#fff; 23 | $black:#000; 24 | $body-bg:#ecf0f5; 25 | $disabled-bg:#eee; 26 | 27 | /** 饿了么主题变量 **/ 28 | //品牌颜色 29 | $--color-primary:$light-blue; 30 | $--color-success:$green; 31 | $--color-warning:$yellow; 32 | $--color-danger:$red; 33 | $--color-info:$aqua; 34 | //文字颜色 35 | $--color-text-primary: $light-blue;//主要主题颜色 36 | $--color-text-regular: $regular;//常规字体颜色 37 | $--color-text-placeholder: $gray-lte;//未选择颜色 38 | $--color-text-secondary: $secondary;//次要字体颜色 39 | //边框颜色 40 | $--border-color-base:$gray-lte; 41 | //背景颜色 42 | $--color-white:$white; 43 | $--color-black:$black; 44 | $--background-color-base:$body-bg; 45 | $--input-border-radius:0px; 46 | 47 | /** Bootstarp主题变量 **/ 48 | $brand-primary:$light-blue; 49 | $brand-success:$green; 50 | $brand-info:$aqua; 51 | $brand-warning:$yellow; 52 | $brand-danger:$red; 53 | $input-height-base:36px; 54 | 55 | /** 自定义主题变量 **/ 56 | $themes: 'primary' 'info' 'success' 'warning' 'danger'; 57 | $error: #d73925; 58 | // Brands 59 | $brands:( 60 | primary:$light-blue, 61 | info:$aqua, 62 | success:$green, 63 | warning:$yellow, 64 | danger:$red 65 | ); 66 | $btns:(); 67 | @each $i in $themes { 68 | $btns: map-merge($btns, ( 69 | $i:( 70 | bg:map-get($brands, $i), 71 | border:darken(map-get($brands, $i), 5%), 72 | hover:darken(map-get($brands, $i), 5%) 73 | ) 74 | ) 75 | ) !global 76 | } 77 | 78 | -------------------------------------------------------------------------------- /resources/lang/vendor/backup/ja/notifications.php: -------------------------------------------------------------------------------- 1 | '例外のメッセージ: :message', 5 | 'exception_trace' => '例外の追跡: :trace', 6 | 'exception_message_title' => '例外のメッセージ', 7 | 'exception_trace_title' => '例外の追跡', 8 | 9 | 'backup_failed_subject' => ':application_name のバックアップに失敗しました。', 10 | 'backup_failed_body' => '重要: :application_name のバックアップ中にエラーが発生しました。', 11 | 12 | 'backup_successful_subject' => ':application_name のバックアップに成功しました。', 13 | 'backup_successful_subject_title' => 'バックアップに成功しました!', 14 | 'backup_successful_body' => '朗報です。ディスク :disk_name へ :application_name のバックアップが成功しました。', 15 | 16 | 'cleanup_failed_subject' => ':application_name のバックアップ削除に失敗しました。', 17 | 'cleanup_failed_body' => ':application_name のバックアップ削除中にエラーが発生しました。', 18 | 19 | 'cleanup_successful_subject' => ':application_name のバックアップ削除に成功しました。', 20 | 'cleanup_successful_subject_title' => 'バックアップ削除に成功しました!', 21 | 'cleanup_successful_body' => 'ディスク :disk_name に保存された :application_name のバックアップ削除に成功しました。', 22 | 23 | 'healthy_backup_found_subject' => 'ディスク :disk_name への :application_name のバックアップは正常です。', 24 | 'healthy_backup_found_subject_title' => ':application_name のバックアップは正常です。', 25 | 'healthy_backup_found_body' => ':application_name へのバックアップは正常です。いい仕事してますね!', 26 | 27 | 'unhealthy_backup_found_subject' => '重要: :application_name のバックアップに異常があります。', 28 | 'unhealthy_backup_found_subject_title' => '重要: :application_name のバックアップに異常があります。 :problem', 29 | 'unhealthy_backup_found_body' => ':disk_name への :application_name のバックアップに異常があります。', 30 | 'unhealthy_backup_found_not_reachable' => 'バックアップ先にアクセスできませんでした。 :error', 31 | 'unhealthy_backup_found_empty' => 'このアプリケーションのバックアップは見つかりませんでした。', 32 | 'unhealthy_backup_found_old' => ':date に保存された直近のバックアップが古すぎます。', 33 | 'unhealthy_backup_found_unknown' => '申し訳ございません。予期せぬエラーです。', 34 | 'unhealthy_backup_found_full' => 'バックアップがディスク容量を圧迫しています。現在の使用量 :disk_usage は、許可された限界値 :disk_limit を超えています。', 35 | ]; 36 | -------------------------------------------------------------------------------- /app/Services/ResetProviders.php: -------------------------------------------------------------------------------- 1 | OfficialAccount::class, 31 | 'work' => Work::class, 32 | 'mini_program' => MiniProgram::class, 33 | 'payment' => Payment::class, 34 | 'open_platform' => OpenPlatform::class, 35 | ]; 36 | foreach ($apps as $name => $class) { 37 | if (empty(config('wechat.'.$name))) { 38 | continue; 39 | } 40 | if (!empty(config('wechat.'.$name.'.app_id')) || !empty(config('wechat.'.$name.'.corp_id'))) { 41 | $accounts = [ 42 | 'default' => config('wechat.'.$name), 43 | ]; 44 | config(['wechat.'.$name.'.default' => $accounts['default']]); 45 | } else { 46 | $accounts = config('wechat.'.$name); 47 | } 48 | foreach ($accounts as $account => $config) { 49 | $app->forgetInstance("wechat.{$name}.{$account}"); 50 | } 51 | } 52 | 53 | return $app; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/AppController.php: -------------------------------------------------------------------------------- 1 | '=', 29 | 'id'=>'>', 30 | 'name|version'=>'like' 31 | ]; 32 | 33 | public $orderDefault=[ 34 | 'id'=>'desc' 35 | ]; 36 | 37 | public $showIndexFields=[ 38 | 'id', 39 | 'type', 40 | 'name', 41 | 'version', 42 | 'forced_update', 43 | 'created_at', 44 | 'updated_at', 45 | 'operate_id', 46 | 'operate'=>[ 47 | 'id', 48 | 'name' 49 | ] 50 | ]; 51 | 52 | /** 53 | * 验证规则 54 | * @return array 55 | */ 56 | protected function getValidateRule($id=0) 57 | { 58 | return $this->getImportValidateRule($id,Request::all()); 59 | } 60 | 61 | /** 62 | * 验证规则 63 | * @return array 64 | */ 65 | protected function getImportValidateRule($id = 0, $item){ 66 | $validate = [ 67 | 'type'=>'sometimes|in:0,1', 68 | 'name'=>'required', 69 | 'description'=>'required', 70 | 'url'=>'required|url', 71 | 'version'=>'required', 72 | 'forced_update'=>'sometimes|in:0,1' 73 | ]; 74 | return $validate; 75 | } 76 | 77 | /** 78 | * 编辑页面数据返回处理 79 | * @param $id 80 | * @param $data 81 | * @return mixed 82 | */ 83 | protected function handleEditReturn($id,&$data){ 84 | return $data; 85 | } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /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 | 'weibo' => [ 34 | 'client_id' => env('WEIBO_KEY'), 35 | 'client_secret' => env('WEIBO_SECRET'), 36 | 'redirect' => $redirect.'weibo', 37 | ], 38 | 'qq' => [ 39 | 'client_id' => env('QQ_KEY'), 40 | 'client_secret' => env('QQ_SECRET'), 41 | 'redirect' => $redirect.'qq', 42 | ], 43 | 'weixin' => [ 44 | 'client_id' => env('WEIXIN_KEY'), 45 | 'client_secret' => env('WEIXIN_SECRET'), 46 | 'redirect' => $redirect.'weixin', 47 | ], 48 | 'weixinweb' => [ 49 | 'client_id' => env('WEIXINWEB_KEY'), 50 | 'client_secret' => env('WEIXINWEB_SECRET'), 51 | 'redirect' => $redirect.'weixinweb', 52 | ] 53 | 54 | ]; 55 | })(); 56 | 57 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 41 | 42 | $this->routes(function () { 43 | Route::prefix(config('laravel_admin.api_route_prefix')) 44 | ->middleware(['api','api_client','auth:sanctum']) 45 | ->namespace($this->namespace) 46 | ->group(base_path('routes/api.php')); 47 | 48 | Route::middleware('web') 49 | ->namespace($this->namespace) 50 | ->group(base_path('routes/web.php')); 51 | }); 52 | } 53 | 54 | /** 55 | * Configure the rate limiters for the application. 56 | * 57 | * @return void 58 | */ 59 | protected function configureRateLimiting() 60 | { 61 | RateLimiter::for('api', function (Request $request) { 62 | return Limit::perMinute(60); 63 | }); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /database/migrations/2014/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->comment('ID'); 18 | $table->string('uname', 20)->default('')->index()->comment('用户名@sometimes|required|alpha_dash|between:6,18|unique:users,uname'); 19 | $table->string('password', 100)->default('')->comment('密码$password@sometimes|required|digits_between:6,18'); 20 | $table->string('name', 50)->default('')->index()->comment('昵称@required'); 21 | $table->string('avatar')->default('')->comment('头像@sometimes|required|url'); 22 | $table->string('email', 100)->default('')->index()->comment('电子邮箱@sometimes|required|email|unique:users,email'); 23 | $table->string('mobile_phone', 11)->default('')->index()->comment('手机号码@sometimes|required|mobile_phone|unique:users,mobile_phone'); 24 | $table->string('remember_token', 100)->default('')->comment('记住登录'); 25 | $table->tinyInteger('status')->default(2)->comment('状态:0-注销,1-有效,2-停用$radio@nullable|in:0,1,2'); 26 | $table->timestamp('email_verified_at')->nullable()->comment('激活时间'); 27 | $table->text('description', 65535)->nullable()->comment('备注$textarea'); 28 | $table->timestamps(); 29 | $table->softDeletes(); 30 | //设置表备注 31 | $table->charset = config('database.connections.'.config('database.default').'.charset'). 32 | ' COMMENT="用户$softDeletes,timestamps"'; 33 | }); 34 | } 35 | 36 | 37 | /** 38 | * Reverse the migrations. 39 | * 40 | * @return void 41 | */ 42 | public function down() 43 | { 44 | Schema::dropIfExists('users'); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /resources/js/pages/open/messages/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 51 | 55 | -------------------------------------------------------------------------------- /app/Console/DevelopCommands/CreateSeed.php: -------------------------------------------------------------------------------- 1 | outputPath = database_path('seeders/'.class_basename($this->argument('model')).'TableSeeder'); 35 | } 36 | 37 | /** 38 | * 创建迁徙文件 39 | */ 40 | protected function readyDatas(){ 41 | $data['model_namespace'] = false; 42 | if($this->option('namespace')){ 43 | $model = str_replace('/','\\',$this->argument('model')); 44 | }else{ 45 | $model = 'App\\'.str_replace('/','\\',$this->argument('model')); 46 | } 47 | $this->bindModel = new $model(); 48 | $data['php'] = 'argument('model')); 52 | $connection = $this->bindModel->getConnectionName() ?: config('database.default'); 53 | $prefix = config('database.connections.'.$connection.'.prefix'); 54 | $trueTable = $prefix.$this->bindModel->getTable(); 55 | $data['data'] = collect(DB::connection($connection)->select('SELECT * FROM `'.$trueTable.'`'))->map(function($item){ 56 | return collect($item)->toArray(); 57 | })->toJson(JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT); 58 | $this->datas = $data; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/Http/Middleware/AuthenticateRedirect.php: -------------------------------------------------------------------------------- 1 | client_id && 31 | $user->client_id!=SessionService::getId()) 32 | ){ 33 | $url = '/open/login'; 34 | $referer_page = FacadesRequest::instance()->header('RefererPage',''); 35 | if($referer_page){ 36 | $url .='?back_url='.$this->getRequestUri($referer_page); 37 | } 38 | return Response::returns([ 39 | 'title'=>Lang::get('status.status302'), 40 | 'content'=>Lang::get('status.redirectTo').$url, 41 | 'redirect' => $url, 42 | 'force_logout'=>$force_logout 43 | ],302); 44 | } 45 | return $next($request); 46 | } 47 | 48 | public function getRequestUri($url){ 49 | $info = parse_url($url); 50 | $str = ''; 51 | if($path = Arr::get($info,'path')){ 52 | $str .= $path; 53 | } 54 | if($query = Arr::get($info,'query')){ 55 | $str .= '?'.$query; 56 | } 57 | if($fragment = Arr::get($info,'fragment')){ 58 | $str .= '#'.$fragment; 59 | } 60 | return $str; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/Http/Middleware/ClientMiddleware.php: -------------------------------------------------------------------------------- 1 | except = [ 14 | getRoutePrefix().'/open/config', 15 | getRoutePrefix().'/open/client-id' 16 | ]; 17 | 18 | } 19 | 20 | protected $except = []; //排除路由 21 | 22 | /** 23 | * Determine if the request has a URI that should pass through CSRF verification. 24 | * 25 | * @param \Illuminate\Http\Request $request 26 | * @return bool 27 | */ 28 | protected function inExceptArray($request) 29 | { 30 | foreach ($this->except as $except) { 31 | if ($except !== '/') { 32 | $except = trim($except, '/'); 33 | } 34 | 35 | if ($request->fullUrlIs($except) || $request->is($except)) { 36 | return true; 37 | } 38 | } 39 | 40 | return false; 41 | } 42 | 43 | /** 44 | * 脚本运行时调用 45 | * 46 | * Handle an incoming request. 47 | * 48 | * @param \Illuminate\Http\Request $request 49 | * @param \Closure $next 50 | * @return mixed 51 | */ 52 | 53 | public function handle($request, Closure $next) 54 | { 55 | if(!$this->inExceptArray($request)){ 56 | $auth = ClientAuth::auth(); 57 | if(!$auth){ 58 | return Response::returns([ 59 | 'message'=>trans('Unauthenticated'), 60 | 'type'=>'app_client' 61 | ],401); 62 | } 63 | } 64 | $response = $next($request); 65 | //后置操作 66 | return $response; 67 | } 68 | 69 | 70 | /** 71 | * 72 | * 结果返回到客户端后调用 73 | * 74 | * Handle an incoming request. 75 | * 76 | * param \Illuminate\Http\Request $request 77 | * param \Closure $next 78 | * return mixed 79 | */ 80 | public function terminate($request, $response) 81 | { 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /resources/js/pages/open/apps/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 51 | 55 | -------------------------------------------------------------------------------- /docker/nginx/vhost_dev/local.laraveladmin.cn.conf: -------------------------------------------------------------------------------- 1 | map $http_upgrade $connection_upgrade { 2 | default upgrade; 3 | '' close; 4 | } 5 | upstream local_laraveladmin_cn { 6 | # Connect IP:Port 7 | server php:1215 weight=5 max_fails=3 fail_timeout=30s; 8 | keepalive 16; 9 | } 10 | server { 11 | listen 80; 12 | root /var/www/laravel/laraveladmin/public; 13 | server_name local.laraveladmin.cn; 14 | index index.shtml index.html index.htm index.php; 15 | sendfile on; 16 | tcp_nodelay on; 17 | client_max_body_size 100m; 18 | 19 | #access_log /data/logs/nginx80_access.log main; 20 | #error_log /data/logs/nginx80_error.log; 21 | 22 | location ~ \.php(/|$) { 23 | try_files $uri /index.php =404; 24 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 25 | fastcgi_pass phpfpm:9000; 26 | fastcgi_index index.php; 27 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 28 | include fastcgi_params; 29 | } 30 | location @local_laraveladmin_cn_http { 31 | proxy_http_version 1.1; 32 | proxy_set_header X-Real-IP $remote_addr; 33 | proxy_set_header X-Real-PORT $remote_port; 34 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 35 | proxy_set_header Host $http_host; 36 | proxy_set_header Scheme $scheme; 37 | proxy_set_header Server-Protocol $server_protocol; 38 | proxy_set_header Server-Name $server_name; 39 | proxy_set_header Server-Addr $server_addr; 40 | proxy_set_header Server-Port $server_port; 41 | proxy_set_header Upgrade $http_upgrade; 42 | proxy_set_header Connection $connection_upgrade; 43 | proxy_pass http://local_laraveladmin_cn; 44 | } 45 | location ~ ^/(open|home|admin)/ { 46 | try_files $uri $uri/ /index.html /index.php?$1; 47 | break; 48 | } 49 | location ~ ^/(web-api/open/delay|api/open/delay|_debugbar) { 50 | rewrite ^/(.*)$ /index.php?$1 last; 51 | break; 52 | } 53 | 54 | location / { 55 | if (!-e $request_filename) { 56 | rewrite ^/(.*)$ /index.php?$1 last; 57 | break; 58 | } 59 | } 60 | # location / { 61 | # try_files $uri $uri/ @local_laraveladmin_cn_http; 62 | # } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /resources/lang/zh-CN/commands.php: -------------------------------------------------------------------------------- 1 | '编译生成前端入口文件"index.html"', 16 | 'Execute all migration files'=>"执行所有迁移文件", 17 | 'Is the ":file" file already overwritten?'=>'文件“:file”已存在是否覆盖?[y|N]', 18 | 'The ":file" file already exists'=>'文件“:file”已存在', 19 | 'File ":file" created successfully'=>'文件“:file”创建成功', 20 | 'Failed to create file ":file"'=>'文件“:file”创建失败', 21 | 'Generate all resources'=>'生成所有资源', 22 | 'Custom template controller generation'=>'自定义模板控制器生成', 23 | 'Created At'=>'创建时间', 24 | 'Updated At'=>'修改时间', 25 | 'Deleted At'=>'删除时间', 26 | 'Custom template model generation'=>'自定义模板模型生成', 27 | 'Custom template data fill file generation'=>'自定义模板数据填充文件生成', 28 | 'Custom template front-end view generation'=>'自定义模板前端视图生成', 29 | 'The application language is not set to English to execute'=>'应用的语言不是设置为英语时才可执行', 30 | 'From ":old" to ":new"'=>'从":old"至":new"', 31 | 'Failed to translate ":old"'=>'翻译":old"失败', 32 | 'Failed to translate ":old" into ":lang"'=>'翻译":old"成":lang"失败', 33 | 'This command can only be executed in the development environment'=>'只能在开发环境才可执行该命令', 34 | 'Automatic scan to generate Api document data'=>'自动扫描生成Api文档数据', 35 | 'Initializing the creation of a soft connection'=>'初始化创建软连接', 36 | 'The ":link" link has been connected to ":target"'=>'软连接":link"已经连接到":target"', 37 | 'The links have been created'=>'链接已经全部创建', 38 | 'To enable support for relative links, please install the symfony/filesystem package'=>'要启用相对链接的支持,请安装symfony/filesystem包', 39 | 'Failed to delete file ":file"'=>'删除文件”:file”失败', 40 | 'Create asymmetric encryption key pair for API interface encryption and decryption'=>'创建API接口加解密使用的非对称加密秘钥对' 41 | 42 | ]; 43 | --------------------------------------------------------------------------------