From dc963e943fa332c4021cf3e0f74b6e4f0f9a38f0 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sun, 6 Nov 2022 19:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E5=88=B0=20Laravel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 7 +- .env.example | 65 +- .gitattributes | 11 + .gitignore | 18 +- .styleci.yml | 6 - README.md | 64 +- app/Console/Commands/BanUser.php | 2 +- app/Console/Commands/CalcModule.php | 2 +- app/Console/Commands/Cluster/Init.php | 136 - app/Console/Commands/Cluster/Send.php | 107 - app/Console/Commands/Cluster/Sync.php | 42 - app/Console/Commands/Cluster/Work.php | 76 - app/Console/Commands/Count.php | 4 +- app/Console/Commands/GetUser.php | 4 +- app/Console/Commands/ReduceBalance.php | 2 +- app/Console/Commands/UserAddBalance.php | 9 +- app/Console/Kernel.php | 65 +- app/Events/ServerEvent.php | 1 - app/Events/UserEvent.php | 3 +- app/Exceptions/Handler.php | 69 +- app/Helpers.php | 48 - .../Admin/Admin/AdminController.php | 78 - .../Controllers/Admin/Host/HostController.php | 110 - .../Controllers/Admin/User/DropController.php | 84 - .../Controllers/Admin/User/UserController.php | 73 - .../Admin/WorkOrder/WorkOrderController.php | 104 - .../{User => Api}/BalanceController.php | 124 +- .../Controllers/{ => Api}/ForumController.php | 9 +- .../{User => Api}/HostController.php | 29 +- .../Controllers/{ => Api}/IndexController.php | 7 +- app/Http/Controllers/Api/ModuleController.php | 25 + .../{ => Api}/ServerController.php | 3 +- .../{User => Api}/TaskController.php | 5 +- .../Controllers/{ => Api}/UserController.php | 5 +- .../WorkOrder/ReplyController.php | 10 +- .../WorkOrder/WorkOrderController.php | 11 +- app/Http/Controllers/AuthController.php | 162 + app/Http/Controllers/Controller.php | 7 +- .../Remote/BroadcastController.php | 4 +- .../Remote/Host/HostController.php | 6 +- .../Remote/Host/TaskController.php | 9 +- .../Controllers/Remote/ModuleController.php | 31 +- .../Controllers/Remote/UserController.php | 10 +- .../Remote/WorkOrder/ReplyController.php | 5 +- .../Remote/WorkOrder/WorkOrderController.php | 4 +- .../Controllers/User/ModuleController.php | 17 - app/Http/Kernel.php | 69 + app/Http/Middleware/AllowCors.php | 8 - app/Http/Middleware/Authenticate.php | 63 +- app/Http/Middleware/EncryptCookies.php | 17 + app/Http/Middleware/ForceJsonResponse.php | 23 + app/Http/Middleware/LogAllRequest.php | 35 - app/Http/Middleware/Maintenance.php | 31 - .../PreventRequestsDuringMaintenance.php | 17 + .../Middleware/RedirectIfAuthenticated.php | 32 + app/Http/Middleware/TrimStrings.php | 19 + app/Http/Middleware/TrustHosts.php | 20 + app/Http/Middleware/TrustProxies.php | 28 + app/Http/Middleware/ValidateSignature.php | 22 + app/Http/Middleware/VerifyCsrfToken.php | 17 + .../Requests/Remote/Server/StatusRequest.php | 2 +- app/Http/Requests/Remote/WorkOrderRequest.php | 2 +- .../User/WorkOrder/WorkOrderRequest.php | 6 +- app/Jobs/CalcModule.php | 3 +- app/Jobs/CheckAndChargeBalance.php | 4 +- app/Jobs/ClearTasks.php | 6 +- app/Jobs/DeleteHost.php | 4 +- app/Jobs/Remote/FetchModule.php | 14 +- app/Jobs/Remote/Host.php | 8 +- app/Jobs/Remote/PushHost.php | 6 +- app/Jobs/Remote/PushWorkOrder.php | 8 +- app/Jobs/Remote/WorkOrder/Reply.php | 10 +- app/Jobs/Remote/WorkOrder/WorkOrder.php | 13 +- app/Jobs/SendThisMonthModuleEarnings.php | 2 +- app/Models/AccessToken.php | 14 - app/Models/Admin/Admin.php | 43 - app/Models/{User => }/Balance.php | 14 +- app/Models/Host.php | 38 +- app/Models/{Module => }/Module.php | 36 +- app/Models/{User => }/Task.php | 18 +- app/Models/Transaction.php | 6 +- app/Models/User.php | 27 +- app/Models/User/Drop.php | 96 - app/Models/User/Message.php | 11 - app/Models/WorkOrder/Reply.php | 9 +- app/Models/WorkOrder/WorkOrder.php | 52 +- app/Notifications/ModuleEarnings.php | 66 - app/Notifications/UserBalanceNotification.php | 69 - app/Notifications/WorkOrderNotification.php | 102 - app/Observers/BalanceObserve.php | 68 - app/Observers/WorkOrder/ReplyObserver.php | 66 - app/Observers/WorkOrder/WorkOrderObserver.php | 71 - app/Providers/AppServiceProvider.php | 78 +- app/Providers/AuthServiceProvider.php | 72 +- app/Providers/BroadcastServiceProvider.php | 8 + app/Providers/EventServiceProvider.php | 32 +- app/Providers/RouteBindingServiceProvider.php | 37 - app/Providers/RouteServiceProvider.php | 52 + artisan | 38 +- bin/fswatch | 26 - bin/inotify | 28 - bin/laravels | 168 - bootstrap/app.php | 165 +- bootstrap/cache/.gitignore | 2 + composer.json | 61 +- composer.lock | 5723 +++++------------ config/app.php | 111 +- config/auth.php | 60 +- config/broadcasting.php | 26 +- config/cache.php | 78 +- config/cors.php | 34 + config/database.php | 72 +- config/filesystems.php | 36 +- config/hashing.php | 52 + config/laravels.php | 312 - config/logging.php | 122 + config/mail.php | 118 + config/oauth.php | 10 + config/pay.php | 95 + config/queue.php | 28 +- config/sanctum.php | 67 + config/services.php | 34 + config/session.php | 201 + config/view.php | 36 + database/.gitignore | 1 + database/factories/UserFactory.php | 33 +- ...01_create_personal_access_tokens_table.php | 1 + .../2022_08_09_090833_create_admins_table.php | 54 - ...08_12_082631_create_transcations_table.php | 1 - ...2022_08_12_123308_create_modules_table.php | 6 +- .../2022_08_13_051148_create_hosts_table.php | 1 - ..._051817_create_workorder_replies_table.php | 8 +- ...9_08_142023_create_access_tokens_table.php | 36 - ...2_09_14_214642_drop_transcations_table.php | 1 - ...09_14_215159_create_transactions_table.php | 5 + .../2022_10_03_123715_convert_user_drops.php | 2 +- database/seeders/DatabaseSeeder.php | 11 +- lang/en/auth.php | 20 + lang/en/pagination.php | 19 + lang/en/passwords.php | 22 + lang/en/validation.php | 174 + package.json | 14 + phpunit.xml | 18 +- public/.htaccess | 2 +- public/favicon.ico | 0 public/index.php | 47 +- public/robots.txt | 2 + resources/css/app.css | 0 resources/js/app.js | 1 + resources/js/bootstrap.js | 34 + resources/views/banned.blade.php | 19 + resources/views/index.blade.php | 71 + resources/views/not_verified.blade.php | 20 + routes/api.php | 131 +- routes/{old => }/console.php | 0 routes/old/admin.php | 28 - routes/old/api.php | 33 - routes/old/channels.php | 18 - routes/old/remote.php | 20 - routes/old/web.php | 31 - routes/remote.php | 114 - routes/web.php | 71 +- storage/app/.gitignore | 1 + storage/app/public/.gitignore | 2 + storage/framework/.gitignore | 9 + storage/framework/testing/.gitignore | 2 + tests/CreatesApplication.php | 22 + tests/Feature/ExampleTest.php | 21 + tests/TestCase.php | 10 + tests/Unit/ExampleTest.php | 18 + vite.config.js | 11 + 171 files changed, 4346 insertions(+), 7769 deletions(-) create mode 100644 .gitattributes delete mode 100644 .styleci.yml delete mode 100644 app/Console/Commands/Cluster/Init.php delete mode 100644 app/Console/Commands/Cluster/Send.php delete mode 100644 app/Console/Commands/Cluster/Sync.php delete mode 100644 app/Console/Commands/Cluster/Work.php delete mode 100644 app/Helpers.php delete mode 100644 app/Http/Controllers/Admin/Admin/AdminController.php delete mode 100644 app/Http/Controllers/Admin/Host/HostController.php delete mode 100644 app/Http/Controllers/Admin/User/DropController.php delete mode 100644 app/Http/Controllers/Admin/User/UserController.php delete mode 100644 app/Http/Controllers/Admin/WorkOrder/WorkOrderController.php rename app/Http/Controllers/{User => Api}/BalanceController.php (62%) rename app/Http/Controllers/{ => Api}/ForumController.php (93%) rename app/Http/Controllers/{User => Api}/HostController.php (78%) rename app/Http/Controllers/{ => Api}/IndexController.php (54%) create mode 100644 app/Http/Controllers/Api/ModuleController.php rename app/Http/Controllers/{ => Api}/ServerController.php (88%) rename app/Http/Controllers/{User => Api}/TaskController.php (72%) rename app/Http/Controllers/{ => Api}/UserController.php (80%) rename app/Http/Controllers/{User => Api}/WorkOrder/ReplyController.php (89%) rename app/Http/Controllers/{User => Api}/WorkOrder/WorkOrderController.php (92%) create mode 100644 app/Http/Controllers/AuthController.php delete mode 100644 app/Http/Controllers/User/ModuleController.php create mode 100644 app/Http/Kernel.php create mode 100644 app/Http/Middleware/EncryptCookies.php create mode 100644 app/Http/Middleware/ForceJsonResponse.php delete mode 100644 app/Http/Middleware/LogAllRequest.php delete mode 100644 app/Http/Middleware/Maintenance.php create mode 100644 app/Http/Middleware/PreventRequestsDuringMaintenance.php create mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php create mode 100644 app/Http/Middleware/TrimStrings.php create mode 100644 app/Http/Middleware/TrustHosts.php create mode 100644 app/Http/Middleware/TrustProxies.php create mode 100644 app/Http/Middleware/ValidateSignature.php create mode 100644 app/Http/Middleware/VerifyCsrfToken.php delete mode 100644 app/Models/AccessToken.php delete mode 100644 app/Models/Admin/Admin.php rename app/Models/{User => }/Balance.php (64%) rename app/Models/{Module => }/Module.php (82%) rename app/Models/{User => }/Task.php (90%) delete mode 100644 app/Models/User/Drop.php delete mode 100644 app/Models/User/Message.php delete mode 100644 app/Notifications/ModuleEarnings.php delete mode 100644 app/Notifications/UserBalanceNotification.php delete mode 100644 app/Notifications/WorkOrderNotification.php delete mode 100644 app/Observers/BalanceObserve.php delete mode 100644 app/Observers/WorkOrder/ReplyObserver.php delete mode 100644 app/Observers/WorkOrder/WorkOrderObserver.php delete mode 100644 app/Providers/RouteBindingServiceProvider.php create mode 100644 app/Providers/RouteServiceProvider.php delete mode 100755 bin/fswatch delete mode 100755 bin/inotify delete mode 100755 bin/laravels create mode 100644 bootstrap/cache/.gitignore create mode 100644 config/cors.php create mode 100644 config/hashing.php delete mode 100644 config/laravels.php create mode 100644 config/logging.php create mode 100644 config/mail.php create mode 100644 config/oauth.php create mode 100644 config/pay.php create mode 100644 config/sanctum.php create mode 100644 config/services.php create mode 100644 config/session.php create mode 100644 config/view.php create mode 100644 database/.gitignore delete mode 100644 database/migrations/2022_08_09_090833_create_admins_table.php delete mode 100644 database/migrations/2022_09_08_142023_create_access_tokens_table.php create mode 100644 lang/en/auth.php create mode 100644 lang/en/pagination.php create mode 100644 lang/en/passwords.php create mode 100644 lang/en/validation.php create mode 100644 package.json create mode 100644 public/favicon.ico create mode 100644 public/robots.txt create mode 100644 resources/css/app.css create mode 100644 resources/js/app.js create mode 100644 resources/js/bootstrap.js create mode 100644 resources/views/banned.blade.php create mode 100644 resources/views/index.blade.php create mode 100644 resources/views/not_verified.blade.php rename routes/{old => }/console.php (100%) delete mode 100644 routes/old/admin.php delete mode 100644 routes/old/api.php delete mode 100644 routes/old/channels.php delete mode 100644 routes/old/remote.php delete mode 100644 routes/old/web.php delete mode 100644 routes/remote.php create mode 100644 storage/app/public/.gitignore create mode 100644 storage/framework/.gitignore create mode 100644 storage/framework/testing/.gitignore create mode 100644 tests/CreatesApplication.php create mode 100644 tests/Feature/ExampleTest.php create mode 100644 tests/TestCase.php create mode 100644 tests/Unit/ExampleTest.php create mode 100644 vite.config.js diff --git a/.editorconfig b/.editorconfig index 6537ca4..8f0de65 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,9 +3,9 @@ root = true [*] charset = utf-8 end_of_line = lf -insert_final_newline = true -indent_style = space indent_size = 4 +indent_style = space +insert_final_newline = true trim_trailing_whitespace = true [*.md] @@ -13,3 +13,6 @@ trim_trailing_whitespace = false [*.{yml,yaml}] indent_size = 2 + +[docker-compose.yml] +indent_size = 4 diff --git a/.env.example b/.env.example index 2974220..804d610 100644 --- a/.env.example +++ b/.env.example @@ -1,39 +1,62 @@ -APP_NAME=Lumen +APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=lae +DB_USERNAME=root +DB_PASSWORD= + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +FILESYSTEM_DISK=local +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +MEMCACHED_HOST=127.0.0.1 REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=homestead -DB_USERNAME=homestead -DB_PASSWORD=secret +MAIL_MAILER=smtp +MAIL_HOST=mailhog +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" -MONGO_DB_HOST=127.0.0.1 -MONGO_DB_PORT=27017 -MONGO_DB_DATABASE= -MONGO_DB_USERNAME= -MONGO_DB_PASSWORD= -MONGO_DB_AUTHENTICATION_DATABASE=admin +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false -BROADCAST_DRIVER=redis +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_HOST= +PUSHER_PORT=443 +PUSHER_SCHEME=https +PUSHER_APP_CLUSTER=mt1 -PUSHER_APP_KEY=app-key -PUSHER_APP_ID=app-id -PUSHER_APP_SECRET=app-secret -PUSHER_HOST=127.0.0.1 -PUSHER_PORT=6001 -PUSHER_SCHEME=http +VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +VITE_PUSHER_HOST="${PUSHER_HOST}" +VITE_PUSHER_PORT="${PUSHER_PORT}" +VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" +VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" -LARAVELS_LISTEN_IP=127.0.0.0 ALIPAY_APP_ID= diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7dbbf41 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +* text=auto + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +/.github export-ignore +CHANGELOG.md export-ignore +.styleci.yml export-ignore diff --git a/.gitignore b/.gitignore index 2896e86..f0d10af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,18 @@ +/node_modules +/public/build +/public/hot +/public/storage +/storage/*.key /vendor -/.idea +.env +.env.backup +.env.production +.phpunit.result.cache Homestead.json Homestead.yaml -.env -.phpunit.result.cache +auth.json +npm-debug.log +yarn-error.log +/.fleet +/.idea +/.vscode diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 8980121..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,6 +0,0 @@ -php: - preset: laravel - disabled: - - unused_use -js: true -css: true diff --git a/README.md b/README.md index f642e54..bf0ddd9 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,66 @@ -# Lumen PHP Framework +

Laravel Logo

-[![Build Status](https://travis-ci.org/laravel/lumen-framework.svg)](https://travis-ci.org/laravel/lumen-framework) -[![Total Downloads](https://img.shields.io/packagist/dt/laravel/lumen-framework)](https://packagist.org/packages/laravel/lumen-framework) -[![Latest Stable Version](https://img.shields.io/packagist/v/laravel/lumen-framework)](https://packagist.org/packages/laravel/lumen-framework) -[![License](https://img.shields.io/packagist/l/laravel/lumen)](https://packagist.org/packages/laravel/lumen-framework) +

+Build Status +Total Downloads +Latest Stable Version +License +

-Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching. +## About Laravel -## Official Documentation +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: -Documentation for the framework can be found on the [Lumen website](https://lumen.laravel.com/docs). +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, powerful, and provides tools required for large, robust applications. + +## Learning Laravel + +Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. + +You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. + +If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. + +## Laravel Sponsors + +We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). + +### Premium Partners + +- **[Vehikl](https://vehikl.com/)** +- **[Tighten Co.](https://tighten.co)** +- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** +- **[64 Robots](https://64robots.com)** +- **[Cubet Techno Labs](https://cubettech.com)** +- **[Cyber-Duck](https://cyber-duck.co.uk)** +- **[Many](https://www.many.co.uk)** +- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** +- **[DevSquad](https://devsquad.com)** +- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** +- **[OP.GG](https://op.gg)** +- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** +- **[Lendio](https://lendio.com)** ## Contributing -Thank you for considering contributing to Lumen! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). + +## Code of Conduct + +In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). ## Security Vulnerabilities -If you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. ## License -The Lumen framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). +The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/app/Console/Commands/BanUser.php b/app/Console/Commands/BanUser.php index 129527e..afbb1e7 100644 --- a/app/Console/Commands/BanUser.php +++ b/app/Console/Commands/BanUser.php @@ -2,9 +2,9 @@ namespace App\Console\Commands; +use App\Models\AccessToken; use App\Models\Host; use App\Models\User; -use App\Models\AccessToken; use Illuminate\Console\Command; class BanUser extends Command diff --git a/app/Console/Commands/CalcModule.php b/app/Console/Commands/CalcModule.php index ee8fdea..6a3ac04 100644 --- a/app/Console/Commands/CalcModule.php +++ b/app/Console/Commands/CalcModule.php @@ -3,7 +3,7 @@ namespace App\Console\Commands; use App\Http\Controllers\Remote\ModuleController; -use App\Models\Module\Module; +use App\Models\Module; use Illuminate\Console\Command; class CalcModule extends Command diff --git a/app/Console/Commands/Cluster/Init.php b/app/Console/Commands/Cluster/Init.php deleted file mode 100644 index d321f45..0000000 --- a/app/Console/Commands/Cluster/Init.php +++ /dev/null @@ -1,136 +0,0 @@ -warn('检查服务可用性'); - - // 检查是否可以连接到数据库 - try { - DB::connection()->getPdo(); - $this->info('数据库连接正常'); - } catch (\Exception $e) { - $this->error($e->getMessage()); - } - - // 检测是否可以连接到 Redis - try { - $redis = app('redis'); - $redis->ping(); - $this->info('Redis 连接正常'); - } catch (\Exception $e) { - $this->error($e->getMessage()); - } - - if (config('app.instance_address')) { - $addr = $this->info('当前实例地址: ' . config('app.instance_address')); - } else { - $this->info('正在获取公网 IP'); - // get public ip - $addr = file_get_contents('https://ifconfig.me/ip'); - $this->warn('公网 IP: ' . $addr); - } - $port = config('laravels.listen_port'); - $type = config('app.instance_type'); - - - $this->info('正在准备节点'); - $instance_id = config('app.instance_id'); - - $inst_data = [ - 'instance_id' => $instance_id, - 'ip' => $addr, - 'port' => $port, - 'type' => $type, - ]; - - dd(cluster_run_wait('register', $inst_data)); - - // 检测其他 莱云 计算节点 - // $nodes = Cache::get('nodes', collect([])); - - // 检测节点是否在集合里 - // $node = $nodes->where('instance_id', $instance_id)->first(); - - // if ($node == null) { - // $this->warn('节点未注册'); - // $this->info('正在注册节点'); - - // // add to collect - // $nodes->push([ - // 'instance_id' => $instance_id, - // 'ip' => $addr, - // 'port' => $port, - // 'type' => $type, - // ]); - - // $this->warn('节点注册成功'); - // } else { - // $this->warn('节点已注册'); - - // // 如果 IP 不同,则更新 IP - // if ($node['ip'] != $addr) { - // $this->info('正在更新节点 IP'); - // $node['ip'] = $addr; - // $this->info('节点 IP 更新成功'); - // } - - // $node['port'] = $port; - // } - - // // save cache - // Cache::forever('nodes', $nodes); - - - - // 检测模块是否正常 - // Module::chunk(100, function ($modules) { - // foreach ($modules as $module) { - // $this->info('检测模块 ' . $module->name); - // if($module->check()) { - // $this->warn('模块 ' . $module->name . ' 正常'); - // } else { - // $this->error('模块 ' . $module->name . ' 异常'); - // } - // } - // }); - } -} diff --git a/app/Console/Commands/Cluster/Send.php b/app/Console/Commands/Cluster/Send.php deleted file mode 100644 index 48a7fff..0000000 --- a/app/Console/Commands/Cluster/Send.php +++ /dev/null @@ -1,107 +0,0 @@ -redis = app('redis')->connection('cluster_ready'); - $this->instance_id = config('app.instance_id'); - } - - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { - // - - $this->info('将上报节点信息到集群中。'); - - // 非堵塞 - // $this->redis->subscribe(['cluster:sync'], function ($message, $channel) { - // $this->info('收到同步请求'); - // }); - - // echo '开始循环发送心跳'; - while (true) { - - // get cpu usage - // $cpu = round($this->getCpuUsage(), 2); - - // echo "CPU: {$cpu}%\n"; - $this->publish(); - - sleep(1); - } - } - - public function getCpuUsage() - { - $load = sys_getloadavg(); - return $load[0]; - } - - - public function subscribe() - { - - // 非堵塞模式 - $this->redis->subscribe(['cluster_ready'], function ($message, $channel) { - echo "Received {$message} from {$channel}\n"; - }); - } - - - public function publish() - { - $this->redis->publish('cluster_ready', json_encode([ - 'instance_id' => $this->instance_id, - 'task_id' => cluster_task_id(), - 'type' => 'register', - 'data' => [ - 'cpu' => $this->getCpuUsage(), - ], - ])); - - // $this->redis->publish('cluster_ready', json_encode([ - // 'instance_id' => $this->instance_id, - // 'task_id' => cluster_task_id(), - // 'type' => 'cpu_usage', - // 'data' => [ - // 'cpu' => $this->getCpuUsage(), - // ], - // ])); - } -} diff --git a/app/Console/Commands/Cluster/Sync.php b/app/Console/Commands/Cluster/Sync.php deleted file mode 100644 index 7252cb4..0000000 --- a/app/Console/Commands/Cluster/Sync.php +++ /dev/null @@ -1,42 +0,0 @@ -redis = app('redis'); - $this->instance_id = config('app.instance_id'); - } - - /** - * Execute the console command. - * - * @return mixed - */ - public function handle() - { - $this->info('节点协调工作开始'); - - $this->redis->subscribe(['cluster_ready'], function ($message, $channel) { - - $message = json_decode($message, true); - - var_dump($message); - }); - } - - - public function subscribe() - { - - // 非堵塞模式 - $this->redis->subscribe(['cluster_ready'], function ($message, $channel) { - echo "Received {$message} from {$channel}\n"; - }); - } - - - public function publish() - { - $this->redis->publish('cluster_ready', json_encode([ - 'instance_id' => $this->instance_id, - 'cpu' => 1 - ])); - } -} diff --git a/app/Console/Commands/Count.php b/app/Console/Commands/Count.php index f057977..b916ddf 100644 --- a/app/Console/Commands/Count.php +++ b/app/Console/Commands/Count.php @@ -3,11 +3,11 @@ namespace App\Console\Commands; use App\Models\Host; -use App\Models\User; use App\Models\Transaction; +use App\Models\User; use App\Models\WorkOrder\Reply; -use Illuminate\Console\Command; use App\Models\WorkOrder\WorkOrder; +use Illuminate\Console\Command; use Illuminate\Support\Facades\Cache; class Count extends Command diff --git a/app/Console/Commands/GetUser.php b/app/Console/Commands/GetUser.php index 942db63..148ae8a 100644 --- a/app/Console/Commands/GetUser.php +++ b/app/Console/Commands/GetUser.php @@ -2,10 +2,10 @@ namespace App\Console\Commands; +use App\Models\Balance; use App\Models\Host; -use App\Models\User; use App\Models\Transaction; -use App\Models\User\Balance; +use App\Models\User; use Illuminate\Console\Command; class GetUser extends Command diff --git a/app/Console/Commands/ReduceBalance.php b/app/Console/Commands/ReduceBalance.php index 959c5ba..804f103 100644 --- a/app/Console/Commands/ReduceBalance.php +++ b/app/Console/Commands/ReduceBalance.php @@ -2,8 +2,8 @@ namespace App\Console\Commands; -use App\Models\User; use App\Models\Transaction; +use App\Models\User; use Illuminate\Console\Command; class ReduceBalance extends Command diff --git a/app/Console/Commands/UserAddBalance.php b/app/Console/Commands/UserAddBalance.php index 3ffa14e..be6827c 100644 --- a/app/Console/Commands/UserAddBalance.php +++ b/app/Console/Commands/UserAddBalance.php @@ -2,12 +2,11 @@ namespace App\Console\Commands; -use App\Models\User; -use App\Models\Transaction; -use App\Models\User\Balance; -use Illuminate\Console\Command; -use Illuminate\Support\Facades\DB; use App\Exceptions\ChargeException; +use App\Models\Balance; +use App\Models\Transaction; +use App\Models\User; +use Illuminate\Console\Command; class UserAddBalance extends Command { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index eccc94f..a6e864b 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,53 +2,17 @@ namespace App\Console; -use App\Console\Commands\BanUser; -use App\Console\Commands\CalcModule; -use App\Console\Commands\Cluster; -use App\Console\Commands\Count; -use App\Console\Commands\GetUser; -use App\Console\Commands\ReduceBalance; -use App\Console\Commands\Status; -use App\Console\Commands\SuspendUserAllHosts; -use App\Console\Commands\UnbanUser; -use App\Console\Commands\UserAddBalance; -use App\Jobs\AutoCloseWorkOrder; -use App\Jobs\CalcModule as JobsCalcModule; -use App\Jobs\CheckAndChargeBalance; use App\Jobs\HostCost; use App\Jobs\ClearTasks; use App\Jobs\DeleteHost; -use App\Jobs\Remote; -use App\Jobs\SendThisMonthModuleEarnings; +use App\Jobs\Remote\FetchModule; +use App\Jobs\Remote\PushWorkOrder; +use App\Jobs\CheckAndChargeBalance; use Illuminate\Console\Scheduling\Schedule; -use Laravel\Lumen\Console\Kernel as ConsoleKernel; +use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { - /** - * The Artisan commands provided by your application. - * - * @var array - */ - protected $commands = [ - // - BanUser::class, - UnbanUser::class, - SuspendUserAllHosts::class, - CalcModule::class, - UserAddBalance::class, - GetUser::class, - ReduceBalance::class, - Count::class, - Status::class, - Cluster\Init::class, - Cluster\Send::class, - Cluster\Work::class, - Cluster\Sync::class, - Commands\System\Down::class, - Commands\System\Up::class, - ]; - /** * Define the application's command schedule. * @@ -57,24 +21,31 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { + $schedule->command('sanctum:prune-expired --hours=24')->daily(); + // dispatch HostCost job $schedule->job(new HostCost())->everyFiveMinutes(); // $schedule->job(new UserSave())->everyTenMinutes(); - $schedule->job(new Remote\FetchModule())->withoutOverlapping()->everyMinute(); + $schedule->job(new FetchModule())->withoutOverlapping()->everyMinute(); // $schedule->job(new Remote\PushHost())->everyMinute()->onOneServer(); - $schedule->job(new Remote\PushWorkOrder())->everyMinute()->onOneServer(); + $schedule->job(new PushWorkOrder())->everyMinute()->onOneServer(); $schedule->job(new ClearTasks())->weekly(); $schedule->job(new DeleteHost())->hourly(); $schedule->job(new CheckAndChargeBalance())->everyFiveMinutes()->onOneServer()->withoutOverlapping(); + } - $schedule->job(new AutoCloseWorkOrder())->everyFiveMinutes(); + /** + * Register the commands for the application. + * + * @return void + */ + protected function commands() + { + $this->load(__DIR__ . '/Commands'); - $schedule->job(new JobsCalcModule())->everyFiveMinutes(); - - // 每天晚上 20 点,发送模块收益 - $schedule->job(new SendThisMonthModuleEarnings())->dailyAt('20:00'); + require base_path('routes/console.php'); } } diff --git a/app/Events/ServerEvent.php b/app/Events/ServerEvent.php index 1cc32cf..8487a20 100644 --- a/app/Events/ServerEvent.php +++ b/app/Events/ServerEvent.php @@ -4,7 +4,6 @@ use Illuminate\Broadcasting\Channel; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; -use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; class ServerEvent extends Event implements ShouldBroadcast { diff --git a/app/Events/UserEvent.php b/app/Events/UserEvent.php index c744784..6ef4aa5 100644 --- a/app/Events/UserEvent.php +++ b/app/Events/UserEvent.php @@ -2,10 +2,9 @@ namespace App\Events; -use Illuminate\Queue\SerializesModels; use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; +use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Auth; class UserEvent extends Event implements ShouldBroadcastNow diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index f2b6638..82a37e4 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,64 +2,49 @@ namespace App\Exceptions; -use Illuminate\Auth\Access\AuthorizationException; -use Illuminate\Database\Eloquent\ModelNotFoundException; -use Illuminate\Validation\ValidationException; -use Laravel\Lumen\Exceptions\Handler as ExceptionHandler; -use Symfony\Component\HttpKernel\Exception\HttpException; +use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Throwable; class Handler extends ExceptionHandler { /** - * A list of the exception types that should not be reported. + * A list of exception types with their corresponding custom log levels. * - * @var array + * @var array, \Psr\Log\LogLevel::*> */ - protected $dontReport = [ - AuthorizationException::class, - HttpException::class, - ModelNotFoundException::class, - ValidationException::class, + protected $levels = [ + // ]; /** - * Report or log an exception. + * A list of the exception types that are not reported. * - * This is a great spot to send exceptions to Sentry, Bugsnag, etc. - * - * @param \Throwable $exception - * @return void - * - * @throws \Exception + * @var array> */ - public function report(Throwable $exception) - { - parent::report($exception); - } + protected $dontReport = [ + // + ]; /** - * Render an exception into an HTTP response. + * A list of the inputs that are never flashed to the session on validation exceptions. * - * @param \Illuminate\Http\Request $request - * @param \Throwable $exception - * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse - * - * @throws \Throwable + * @var array */ - public function render($request, Throwable $exception) + protected $dontFlash = [ + 'current_password', + 'password', + 'password_confirmation', + ]; + + /** + * Register the exception handling callbacks for the application. + * + * @return void + */ + public function register() { - - $rendered = parent::render($request, $exception); - - return response()->json( - [ - 'error' => [ - 'code' => $rendered->getStatusCode(), - 'message' => $exception->getMessage(), - ] - ], - $rendered->getStatusCode() - ); + $this->reportable(function (Throwable $e) { + // + }); } } diff --git a/app/Helpers.php b/app/Helpers.php deleted file mode 100644 index f14b92f..0000000 --- a/app/Helpers.php +++ /dev/null @@ -1,48 +0,0 @@ -connection('cluster_ready'); - - $task_id = cluster_task_id(); - - $redis->publish('cluster_ready', json_encode([ - 'task_id' => $task_id, - 'type' => $command, - 'data' => $data, - ])); - - // 等待结果,最多等待 10 秒 - $result = $redis->blpop("cluster:task:{$task_id}", 10); - - if ($result) { - return json_decode($result[1], true); - } else { - throw new \Exception('任务执行超时'); - } -} - - -// function nodes() -// { -// return Cache::remember('nodes', 60, function () { - -// $collection = collect(['taylor', 'abigail', null])->map(function ($name) { -// return strtoupper($name); -// })->reject(function ($name) { -// return empty($name); -// }); -// }); -// } diff --git a/app/Http/Controllers/Admin/Admin/AdminController.php b/app/Http/Controllers/Admin/Admin/AdminController.php deleted file mode 100644 index c8bf426..0000000 --- a/app/Http/Controllers/Admin/Admin/AdminController.php +++ /dev/null @@ -1,78 +0,0 @@ -simplePaginate(10); - return $this->success($admin); - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function store(Request $request) - { - - // password required - $this->validate($request, [ - 'password' => 'required', - ]); - - $admin = Admin::create($request->all()); - return $this->success($admin); - } - - /** - * Display the specified resource. - * - * @param \App\Models\Admin\Admin $Admin - * @return \Illuminate\Http\Response - */ - public function show(Admin $admin) - { - return $this->success($admin); - } - - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param \App\Models\Admin\Admin $Admin - * @return \Illuminate\Http\Response - */ - public function update(Request $request, Admin $admin) - { - // - $admin->update($request->all()); - - return $this->updated($admin); - } - - /** - * Remove the specified resource from storage. - * - * @param \App\Models\Admin\Admin $Admin - * @return \Illuminate\Http\Response - */ - public function destroy(Admin $admin) - { - // soft delete Admin - $admin->delete(); - return $this->deleted($admin); - } -} diff --git a/app/Http/Controllers/Admin/Host/HostController.php b/app/Http/Controllers/Admin/Host/HostController.php deleted file mode 100644 index 303ff86..0000000 --- a/app/Http/Controllers/Admin/Host/HostController.php +++ /dev/null @@ -1,110 +0,0 @@ -route('user')) { - $hosts = $hosts->where('user_id', $request->route('user')); - } - - $hosts = $hosts->simplePaginate(10); - - return $this->success($hosts); - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * - * @return JsonResponse|Response - */ - public function store(Request $request, Host $host) - { - $this->validate($request, [ - 'name' => 'required|max:255', - 'module_id' => 'required|string|exists:modules,id', - 'price' => 'required|numeric', - ]); - - // if route has user - if ($request->route('user')) { - $user_id = $request->route('user'); - } else { - $this->validate($request, [ - 'user_id' => 'required|integer|exists:users,id', - ]); - $user_id = $request->user_id; - } - - $data = [ - 'name' => $request->name, - 'module_id' => $request->module_id, - 'user_id' => $user_id, - 'price' => $request->price, - 'configuration' => $request->configuration ?? [], - 'status' => $request->status ?? 'pending', - ]; - - - $host = $host->create($data); - - return $this->created($host); - } - - /** - * Display the specified resource. - * - * @param Host $host - * - * @return JsonResponse - */ - public function show(User $user, Host $host) - { - // - // $host->load('providerModule'); - return $this->success($host); - } - - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param Host $host - * - * @return Response - */ - public function update(Request $request, Host $host) - { - // - } - - /** - * Remove the specified resource from storage. - * - * @param Host $host - * - * @return Response - */ - public function destroy(Host $host) - { - // - } -} diff --git a/app/Http/Controllers/Admin/User/DropController.php b/app/Http/Controllers/Admin/User/DropController.php deleted file mode 100644 index 4223f7f..0000000 --- a/app/Http/Controllers/Admin/User/DropController.php +++ /dev/null @@ -1,84 +0,0 @@ -simplePaginate(10); - return $this->success($drop); - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function store(Request $request) - { - // - $this->validate($request, [ - 'amount' => 'integer|required|min:1|max:1000', - ]); - - $data = [ - 'payment' => 'admin', - 'amount' => intval($request->amount), - 'status' => 1, - 'user_id' => $request->route('user'), - 'type' => 'add', - ]; - - $drop = Drop::create($data); - - return $this->success($drop); - } - - /** - * Display the specified resource. - * - * @param \App\Models\User\Drop $drop - * @return \Illuminate\Http\Response - */ - public function show(Drop $drop) - { - // - $this->authorize('show', $drop); - - return $drop; - } - - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param \App\Models\User\Drop $drop - * @return \Illuminate\Http\Response - */ - public function update(Request $request, Drop $drop) - { - // - } - - /** - * Remove the specified resource from storage. - * - * @param \App\Models\User\Drop $drop - * @return \Illuminate\Http\Response - */ - public function destroy(Drop $drop) - { - // - } -} diff --git a/app/Http/Controllers/Admin/User/UserController.php b/app/Http/Controllers/Admin/User/UserController.php deleted file mode 100644 index 9d3b002..0000000 --- a/app/Http/Controllers/Admin/User/UserController.php +++ /dev/null @@ -1,73 +0,0 @@ -simplePaginate(10); - return $this->success($users); - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function store(Request $request) - { - $user = User::create($request->all()); - return $this->success($user); - } - - /** - * Display the specified resource. - * - * @param \App\Models\User\User $user - * @return \Illuminate\Http\Response - */ - public function show(User $user) - { - // dd($user); - return $this->success($user); - } - - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param \App\Models\User\User $user - * @return \Illuminate\Http\Response - */ - public function update(Request $request, User $user) - { - // - $user->update($request->all()); - return $this->updated($user); - - } - - /** - * Remove the specified resource from storage. - * - * @param \App\Models\User\User $user - * @return \Illuminate\Http\Response - */ - public function destroy(User $user) - { - // soft delete user - $user->delete(); - return $this->deleted($user); - } -} diff --git a/app/Http/Controllers/Admin/WorkOrder/WorkOrderController.php b/app/Http/Controllers/Admin/WorkOrder/WorkOrderController.php deleted file mode 100644 index 8e980d8..0000000 --- a/app/Http/Controllers/Admin/WorkOrder/WorkOrderController.php +++ /dev/null @@ -1,104 +0,0 @@ -simplePaginate(10); - return $this->success($work_order); - } - - /** - * Store a newly created resource in storage. - * - * @param Request $request - * - * @return JsonResponse - */ - public function store(Request $request) - { - // - $this->validate($request, [ - 'title' => 'required|max:255', - 'host_id' => 'required|integer|exists:hosts,id', - 'content' => 'required|max:255', - ]); - - $data = [ - 'user_id' => $request->route('user'), - 'title' => $request->title, - 'host_id' => $request->host_id, - 'content' => $request->content, - ]; - - $work_order = WorkOrder::create($data); - - - return $this->created($work_order); - } - - /** - * Display the specified resource. - * - * @param User $user - * @param WorkOrder $work_order - * - * @return JsonResponse - */ - public function show(User $user, Workorder $work_order) - { - // - $work_order->load('replies'); - return $this->success($work_order); - } - - /** - * Update the specified resource in storage. - * - * @param Request $request - * @param User $user - * @param WorkOrder $work_order - * - * @return JsonResponse - */ - public function update(Request $request, User $user, WorkOrder $work_order) - { - $data = Arr::only($request->all(), [ - 'title', - 'content', - ]); - - $work_order->update($data); - return $this->updated($work_order); - } - - /** - * Remove the specified resource from storage. - * - * @param User $user - * @param WorkOrder $work_order - * - * @return JsonResponse - */ - public function destroy(User $user, WorkOrder $work_order) - { - // - $work_order->delete(); - return $this->deleted($work_order); - } -} diff --git a/app/Http/Controllers/User/BalanceController.php b/app/Http/Controllers/Api/BalanceController.php similarity index 62% rename from app/Http/Controllers/User/BalanceController.php rename to app/Http/Controllers/Api/BalanceController.php index bfbc593..5a195e2 100644 --- a/app/Http/Controllers/User/BalanceController.php +++ b/app/Http/Controllers/Api/BalanceController.php @@ -1,18 +1,24 @@ 'alipay', ]; + $pay = Pay::alipay()->web([ + 'out_trade_no' => 'lae-' . time(), + 'total_amount' => $request->amount, + 'subject' => '在莱云上充值 ' . $request->amount . ' 元', + ]); + + + return $pay; + + // if local - if (env('APP_ENV') == 'local') { - $data['payment'] = null; - $data['paid_at'] = now(); - } + // if (env('APP_ENV') == 'local') { + // $data['payment'] = null; + // $data['paid_at'] = now(); + // } $balance = $balance->create($data); @@ -83,18 +99,12 @@ public function show(Request $request, Balance $balance) } try { - AlipayFactory::setOptions($this->alipayOptions()); - $result = AlipayFactory::payment()->page()->pay("支付", $balance->order_id, $balance->amount, route('balances.return')); - - $responseChecker = new ResponseChecker(); - - // dd($result); - - if ($responseChecker->success($result)) { - $html = $result->body; - return view('pay', compact('html')); - } + return; + // if ($responseChecker->success($result)) { + // $html = $result->body; + // return view('pay', compact('html')); + // } } catch (Exception $e) { Log::error($e); echo "调用失败," . $e->getMessage() . PHP_EOL;; @@ -154,33 +164,33 @@ public function notify(Request $request) public function checkAndCharge(Balance $balance) { - AlipayFactory::setOptions($this->alipayOptions()); + // AlipayFactory::setOptions($this->alipayOptions()); - $trade = AlipayFactory::payment()->common()->query($balance->order_id); + // $trade = AlipayFactory::payment()->common()->query($balance->order_id); - if ($trade->code == "10000" && $trade->tradeStatus == "TRADE_SUCCESS") { - $balance->paid_at = now(); - $balance->save(); + // if ($trade->code == "10000" && $trade->tradeStatus == "TRADE_SUCCESS") { + // $balance->paid_at = now(); + // $balance->save(); - $transaction = new Transaction(); + // $transaction = new Transaction(); - try { - $transaction->addAmount($balance->user_id, 'alipay', $trade->totalAmount); - } catch (ChargeException $e) { - AlipayFactory::payment()->common()->refund($balance->order_id, $trade->totalAmount); - return $this->error($e->getMessage()); - } + // try { + // $transaction->addAmount($balance->user_id, 'alipay', $trade->totalAmount); + // } catch (ChargeException $e) { + // AlipayFactory::payment()->common()->refund($balance->order_id, $trade->totalAmount); + // return $this->error($e->getMessage()); + // } - return true; - } else { - return false; - } + // return true; + // } else { + // return false; + // } } // // 转换为 drops // public function transfer($amount = 1) // { - // $balance = auth('api')->user(); + // $balance = auth()->user(); // $balance->decrement('amount', $request->amount); // return $this->success($balance); // } @@ -226,32 +236,32 @@ public function drops() } - private function alipayOptions() - { - $options = new AlipayConfig(); - $options->protocol = 'https'; + // private function alipayOptions() + // { + // $options = new AlipayConfig(); + // $options->protocol = 'https'; - // if local - if (app()->environment() == 'local') { - $options->gatewayHost = 'openapi.alipaydev.com'; - } else { - $options->gatewayHost = 'openapi.alipay.com'; - } + // // if local + // if (app()->environment() == 'local') { + // $options->gatewayHost = 'openapi.alipaydev.com'; + // } else { + // $options->gatewayHost = 'openapi.alipay.com'; + // } - $options->signType = 'RSA2'; + // $options->signType = 'RSA2'; - $options->appId = config('payment.alipay.app_id'); + // $options->appId = config('payment.alipay.app_id'); - // 为避免私钥随源码泄露,推荐从文件中读取私钥字符串而不是写入源码中 - $options->merchantPrivateKey = trim(Storage::get('alipayAppPriv.key')); + // // 为避免私钥随源码泄露,推荐从文件中读取私钥字符串而不是写入源码中 + // $options->merchantPrivateKey = trim(Storage::get('alipayAppPriv.key')); - $options->alipayCertPath = storage_path('app/alipayCertPublicKey_RSA2.crt'); - $options->alipayRootCertPath = storage_path('app/alipayRootCert.crt'); - $options->merchantCertPath = storage_path('app/appCertPublicKey.crt'); + // $options->alipayCertPath = storage_path('app/alipayCertPublicKey_RSA2.crt'); + // $options->alipayRootCertPath = storage_path('app/alipayRootCert.crt'); + // $options->merchantCertPath = storage_path('app/appCertPublicKey.crt'); - $options->notifyUrl = route('balances.notify'); + // $options->notifyUrl = route('balances.notify'); - return $options; - } + // return $options; + // } } diff --git a/app/Http/Controllers/ForumController.php b/app/Http/Controllers/Api/ForumController.php similarity index 93% rename from app/Http/Controllers/ForumController.php rename to app/Http/Controllers/Api/ForumController.php index 8c4e74a..d27e3fe 100644 --- a/app/Http/Controllers/ForumController.php +++ b/app/Http/Controllers/Api/ForumController.php @@ -1,12 +1,15 @@ getUserHosts(auth()->id()); + $hosts = Host::where('user_id', auth()->id())->with('module', function ($query) { + $query->select(['id', 'name']); + })->get(); return $this->success($hosts); } - public function update(Request $request, Host $host) + public function update(Request $request, Host $host): JsonResponse { $user = $request->user(); if ($host->user_id == $user->id) { - - // if ($user->balance < 1) { - // return $this->error('余额不足'); - // } - $host->update([ 'status' => 'running' ]); @@ -35,8 +34,6 @@ public function update(Request $request, Host $host) } else { return $this->error('无权操作'); } - - return $this->deleted($host); } public function destroy(Host $host) @@ -61,7 +58,7 @@ public function destroy(Host $host) return $this->deleted($host); } - public function usages() + public function usages(): JsonResponse { $month = now()->month; diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/Api/IndexController.php similarity index 54% rename from app/Http/Controllers/IndexController.php rename to app/Http/Controllers/Api/IndexController.php index 7efbd47..383492e 100644 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/Api/IndexController.php @@ -1,11 +1,14 @@ success([ 'message' => 'Welcome to LoliArt LaeCloud API Server', diff --git a/app/Http/Controllers/Api/ModuleController.php b/app/Http/Controllers/Api/ModuleController.php new file mode 100644 index 0000000..9adbc05 --- /dev/null +++ b/app/Http/Controllers/Api/ModuleController.php @@ -0,0 +1,25 @@ +success($modules); + } + + public function call(Request $request, Module $module): JsonResponse + { + return (new \App\Http\Controllers\Remote\ModuleController())->call($request, $module); + } + + +} diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/Api/ServerController.php similarity index 88% rename from app/Http/Controllers/ServerController.php rename to app/Http/Controllers/Api/ServerController.php index 7b62bd3..3ae7268 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/Api/ServerController.php @@ -1,7 +1,8 @@ $request->title, - 'content' => $request->content, + 'title' => $request_data['title'], + 'content' => $request_data['content'], 'module_id' => $request_data['module_id'] ?? null, 'host_id' => $request_data['host_id'] ?? null, 'status' => 'pending', diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php new file mode 100644 index 0000000..a1adf68 --- /dev/null +++ b/app/Http/Controllers/AuthController.php @@ -0,0 +1,162 @@ +callback) { + + if (Auth::check()) { + + // create token + $token = $request->user()->createToken('Auto login at ' . now()); + + return redirect($request->callback . '?token=' . $token->plainTextToken); + } else { + session(['callback' => $request->callback]); + return redirect()->route('login'); + } + } + + if (Auth::check()) { + $user = Auth::user(); + if ($user->banned_at !== null) { + return redirect()->route('banned'); + } + } + + return view('index'); + } + + public function redirect(Request $request) + { + $request->session()->put('state', $state = Str::random(40)); + + $query = http_build_query([ + 'client_id' => config('oauth.client_id'), + 'redirect_uri' => config('oauth.callback_uri'), + 'response_type' => 'code', + 'scope' => '', + 'state' => $state, + 'meta' => 'test_meta', + ]); + + // dd($query); + + return redirect()->to(config('oauth.oauth_auth_url') . '?' . $query); + } + + public function callback(Request $request) + { + $state = $request->session()->pull('state'); + + if (!strlen($state) > 0 && $state === $request->state) { + return redirect(route('login')); + } + + $http = new Client(); + + try { + $authorize = $http->post(config('oauth.oauth_token_url'), [ + 'form_params' => [ + 'grant_type' => 'authorization_code', + 'client_id' => config('oauth.client_id'), + 'client_secret' => config('oauth.client_secret'), + 'redirect_uri' => config('oauth.callback_uri'), + 'code' => $request->code, + ], + ])->getBody(); + } catch (ClientException) { + return redirect(route('login')); + } + + $authorize = json_decode($authorize); + + $oauth_user = $http->get(config('oauth.oauth_user_url'), [ + 'headers' => [ + 'Accept' => 'application/json', + 'Authorization' => 'Bearer ' . $authorize->access_token, + ], + ])->getBody(); + $oauth_user = json_decode($oauth_user); + + if (is_null($oauth_user->verified_at)) { + return redirect()->route('not_verified'); + } + + $user_sql = User::where('email', $oauth_user->email); + $user = $user_sql->first(); + + if (is_null($user)) { + $name = $oauth_user->name; + $email = $oauth_user->email; + $email_verified_at = $oauth_user->email_verified_at; + $user = User::create([ + 'name' => $name, + 'email' => $email, + 'password' => null, + 'email_verified_at' => $email_verified_at, + 'oauth_id' => $oauth_user->id, + 'provider' => 'LoliArt', + 'provider_id' => $oauth_user->id, + 'real_name' => $oauth_user->real_name, + 'balance' => 0 + ]); + + $request->session()->put('auth.password_confirmed_at', time()); + } else { + if ($user->name != $oauth_user->name) { + User::where('email', $oauth_user->email)->update([ + 'name' => $oauth_user->name + ]); + } + // $api_token = $user->api_token; + } + + Auth::loginUsingId($user->id, true); + + return redirect()->route('index', ['callback' => session('callback')]); + } + + public function newToken(Request $request) + { + $request->validate([ + 'token_name' => 'required|string|max:255', + ]); + + $token = $request->user()->createToken($request->token_name); + + return back()->with('token', $token->plainTextToken); + } + + public function deleteAll(Request $request) + { + $request->user()->tokens()->delete(); + + return back()->with('success', '所有 Token 删除成功。'); + } + + public function logout() + { + Auth::guard('web')->logout(); + + session()->regenerateToken(); + + return redirect()->route('index'); + } +} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index bc856f3..354ad88 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -3,9 +3,12 @@ namespace App\Http\Controllers; use App\Helpers\ApiResponse; -use Laravel\Lumen\Routing\Controller as BaseController; +use Illuminate\Foundation\Auth\Access\AuthorizesRequests; +use Illuminate\Foundation\Bus\DispatchesJobs; +use Illuminate\Foundation\Validation\ValidatesRequests; +use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { - use ApiResponse; + use AuthorizesRequests, DispatchesJobs, ValidatesRequests, ApiResponse; } diff --git a/app/Http/Controllers/Remote/BroadcastController.php b/app/Http/Controllers/Remote/BroadcastController.php index 816dd5d..5b9ad55 100644 --- a/app/Http/Controllers/Remote/BroadcastController.php +++ b/app/Http/Controllers/Remote/BroadcastController.php @@ -2,11 +2,11 @@ namespace App\Http\Controllers\Remote; +use App\Events\UserEvent; +use App\Http\Controllers\Controller; use App\Models\Host; use App\Models\User; -use App\Events\UserEvent; use Illuminate\Http\Request; -use App\Http\Controllers\Controller; class BroadcastController extends Controller { diff --git a/app/Http/Controllers/Remote/Host/HostController.php b/app/Http/Controllers/Remote/Host/HostController.php index adb38e1..baabea8 100644 --- a/app/Http/Controllers/Remote/Host/HostController.php +++ b/app/Http/Controllers/Remote/Host/HostController.php @@ -2,13 +2,13 @@ namespace App\Http\Controllers\Remote\Host; +use App\Http\Controllers\Controller; use App\Models\Host; use App\Models\User; -use Illuminate\Support\Str; use Illuminate\Http\Request; +use Illuminate\Support\Str; + // use Illuminate\Support\Facades\Log; -use App\Http\Controllers\Controller; -use App\Exceptions\User\BalanceNotEnoughException; class HostController extends Controller { diff --git a/app/Http/Controllers/Remote/Host/TaskController.php b/app/Http/Controllers/Remote/Host/TaskController.php index 55ec729..97d663f 100644 --- a/app/Http/Controllers/Remote/Host/TaskController.php +++ b/app/Http/Controllers/Remote/Host/TaskController.php @@ -2,9 +2,9 @@ namespace App\Http\Controllers\Remote\Host; -use App\Models\User\Task; -use Illuminate\Http\Request; use App\Http\Controllers\Controller; +use App\Models\Task; +use Illuminate\Http\Request; class TaskController extends Controller { @@ -48,8 +48,9 @@ public function store(Request $request) /** * Update the specified resource in storage. * - * @param \Illuminate\Http\Request $request - * @param Task $task + * @param \Illuminate\Http\Request $request + * @param \App\Models\Task $task + * * @return \Illuminate\Http\Response */ public function update(Request $request, Task $task) diff --git a/app/Http/Controllers/Remote/ModuleController.php b/app/Http/Controllers/Remote/ModuleController.php index 43433ea..282573b 100644 --- a/app/Http/Controllers/Remote/ModuleController.php +++ b/app/Http/Controllers/Remote/ModuleController.php @@ -2,11 +2,11 @@ namespace App\Http\Controllers\Remote; -use Illuminate\Support\Str; -use Illuminate\Http\Request; -use App\Models\Module\Module; use App\Http\Controllers\Controller; +use App\Models\Module; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Str; class ModuleController extends Controller { @@ -29,23 +29,10 @@ public function index() public function call(Request $request, Module $module) { - // $this->validate($request, [ - // 'func' => 'required|string' - // ]); - - // $func = $request->func; - - // // 不能让 func 的首个字符为 / - // if (Str::startsWith($func, '/')) { - // $func = substr($func, 1); - // } - $path = request()->path(); - // 删除 modules/{module} 的部分 $path = substr($path, strlen('/api/modules/' . $module->id)); - // 过滤除了 "/" 以外的特殊字符 $path = preg_replace('/[^a-zA-Z0-9\/]/', '', $path); @@ -53,7 +40,7 @@ public function call(Request $request, Module $module) // 如果 method 为 post, 检查用户余额 // if ($method == 'post') { - // $user = auth('api')->user(); + // $user = auth()->user(); // if ($user->balance < 1) { // return $this->error('账户余额不足,请保证账户余额至少有 1 元。'); @@ -71,7 +58,7 @@ public function call(Request $request, Module $module) } - public function exportCall(Request $request, Module $module) + public function exportCall(Request $request, Module $module): \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory { $path = request()->path(); @@ -90,7 +77,7 @@ public function exportCall(Request $request, Module $module) } - public function calcModule(Module $module) + public function calcModule(Module $module): array { $default = [ @@ -98,15 +85,11 @@ public function calcModule(Module $module) 'drops' => 0, ]; - - $data = [ + return [ 'transactions' => [ 'this_month' => Cache::get('this_month_balance_and_drops_' . $module->id, $default), 'last_month' => Cache::get('last_month_balance_and_drops_' . $module->id, $default), ] ]; - - - return $data; } } diff --git a/app/Http/Controllers/Remote/UserController.php b/app/Http/Controllers/Remote/UserController.php index 08b1cd7..b5533fd 100644 --- a/app/Http/Controllers/Remote/UserController.php +++ b/app/Http/Controllers/Remote/UserController.php @@ -2,12 +2,12 @@ namespace App\Http\Controllers\Remote; -use App\Models\Host; -use App\Models\User; -use App\Models\Transaction; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; use App\Exceptions\User\BalanceNotEnoughException; +use App\Http\Controllers\Controller; +use App\Models\Host; +use App\Models\Transaction; +use App\Models\User; +use Illuminate\Http\Request; class UserController extends Controller { diff --git a/app/Http/Controllers/Remote/WorkOrder/ReplyController.php b/app/Http/Controllers/Remote/WorkOrder/ReplyController.php index 274bd6f..5999519 100644 --- a/app/Http/Controllers/Remote/WorkOrder/ReplyController.php +++ b/app/Http/Controllers/Remote/WorkOrder/ReplyController.php @@ -2,10 +2,9 @@ namespace App\Http\Controllers\Remote\WorkOrder; -use Illuminate\Http\Request; -use App\Models\WorkOrder\Reply; use App\Http\Controllers\Controller; -use Illuminate\Support\Facades\Log; +use App\Models\WorkOrder\Reply; +use Illuminate\Http\Request; class ReplyController extends Controller { diff --git a/app/Http/Controllers/Remote/WorkOrder/WorkOrderController.php b/app/Http/Controllers/Remote/WorkOrder/WorkOrderController.php index 69680c6..741f806 100644 --- a/app/Http/Controllers/Remote/WorkOrder/WorkOrderController.php +++ b/app/Http/Controllers/Remote/WorkOrder/WorkOrderController.php @@ -2,10 +2,10 @@ namespace App\Http\Controllers\Remote\WorkOrder; -use Illuminate\Http\Request; -use App\Models\WorkOrder\WorkOrder; use App\Http\Controllers\Controller; use App\Http\Requests\Remote\WorkOrderRequest; +use App\Models\WorkOrder\WorkOrder; +use Illuminate\Http\Request; class WorkOrderController extends Controller { diff --git a/app/Http/Controllers/User/ModuleController.php b/app/Http/Controllers/User/ModuleController.php deleted file mode 100644 index 0f8ead2..0000000 --- a/app/Http/Controllers/User/ModuleController.php +++ /dev/null @@ -1,17 +0,0 @@ -cached_modules(); - - return $this->success($modules); - } -} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php new file mode 100644 index 0000000..ec0414f --- /dev/null +++ b/app/Http/Kernel.php @@ -0,0 +1,69 @@ + + */ + protected $middleware = [ + // \App\Http\Middleware\TrustHosts::class, + \App\Http\Middleware\TrustProxies::class, + \Illuminate\Http\Middleware\HandleCors::class, + \App\Http\Middleware\PreventRequestsDuringMaintenance::class, + \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, + \App\Http\Middleware\TrimStrings::class, + \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, + ]; + + /** + * The application's route middleware groups. + * + * @var array> + */ + protected $middlewareGroups = [ + 'web' => [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + + 'api' => [ + // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, + 'throttle:api', + \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\ForceJsonResponse::class, + \App\Http\Middleware\AllowCors::class, + ], + ]; + + /** + * The application's route middleware. + * + * These middleware may be assigned to groups or used individually. + * + * @var array + */ + protected $routeMiddleware = [ + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, + 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, + 'signed' => \App\Http\Middleware\ValidateSignature::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + ]; +} diff --git a/app/Http/Middleware/AllowCors.php b/app/Http/Middleware/AllowCors.php index 001505d..f1483bd 100644 --- a/app/Http/Middleware/AllowCors.php +++ b/app/Http/Middleware/AllowCors.php @@ -37,13 +37,5 @@ public function handle($request, Closure $next) } return $response; - - // // Pre-Middleware Action - - // $response = $next($request); - - // // Post-Middleware Action - - // return $response; } } diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 44f7a44..f7679e7 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -2,51 +2,36 @@ namespace App\Http\Middleware; -use Closure; -use App\Helpers\ApiResponse; -use Illuminate\Contracts\Auth\Factory as Auth; +use Illuminate\Auth\Middleware\Authenticate as Middleware; -class Authenticate +class Authenticate extends Middleware { - use ApiResponse; /** - * The authentication guard factory instance. - * - * @var \Illuminate\Contracts\Auth\Factory - */ - protected $auth; - - /** - * Create a new middleware instance. - * - * @param \Illuminate\Contracts\Auth\Factory $auth - * @return void - */ - public function __construct(Auth $auth) - { - $this->auth = $auth; - } - - /** - * Handle an incoming request. + * Get the path the user should be redirected to when they are not authenticated. * * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null $guard - * @return mixed + * @return string|null */ - public function handle($request, Closure $next, $guard = null) - { - $auth = $this->auth->guard($guard); - if ($auth->guest()) { - return $this->unauthorized('Unauthorized.'); - } + // protected function redirectTo($request) + // { + // if (! $request->expectsJson()) { + // return route('login'); + // } + // } - $user = $this->auth->guard($guard)->user(); - if ($user->banned_at) { - return $this->forbidden('您已被封禁,原因是: ' . $user->banned_reason ?? '一次或多次触犯了我们的规则。'); - } - return $next($request); - } + // public function handle($request, Closure $next, $guard = null) + // { + // $auth = $this->auth->guard($guard); + // if ($auth->guest()) { + // return $this->unauthorized('Unauthorized.'); + // } + + // $user = $this->auth->guard($guard)->user(); + // if ($user->banned_at) { + // return $this->forbidden('您已被封禁,原因是: ' . $user->banned_reason ?? '一次或多次触犯了我们的规则。'); + // } + + // return $next($request); + // } } diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php new file mode 100644 index 0000000..867695b --- /dev/null +++ b/app/Http/Middleware/EncryptCookies.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/app/Http/Middleware/ForceJsonResponse.php b/app/Http/Middleware/ForceJsonResponse.php new file mode 100644 index 0000000..c33c139 --- /dev/null +++ b/app/Http/Middleware/ForceJsonResponse.php @@ -0,0 +1,23 @@ +headers->set('Accept', 'application/json'); + + return $next($request); + } +} diff --git a/app/Http/Middleware/LogAllRequest.php b/app/Http/Middleware/LogAllRequest.php deleted file mode 100644 index ff02b15..0000000 --- a/app/Http/Middleware/LogAllRequest.php +++ /dev/null @@ -1,35 +0,0 @@ - $request->getMethod(), - 'path' => $request->path(), - 'data' => $request->all(), - ]); - // Pre-Middleware Action - - $response = $next($request); - - // Post-Middleware Action - // Log::debug('response', $response->content); - - - return $response; - } -} diff --git a/app/Http/Middleware/Maintenance.php b/app/Http/Middleware/Maintenance.php deleted file mode 100644 index 82a021f..0000000 --- a/app/Http/Middleware/Maintenance.php +++ /dev/null @@ -1,31 +0,0 @@ -json([ - 'message' => '我们正在进行维护,请稍等 2 小时后再来。', - ], 503); - } - - - // continue - return $next($request); - } -} diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php new file mode 100644 index 0000000..74cbd9a --- /dev/null +++ b/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php new file mode 100644 index 0000000..a2813a0 --- /dev/null +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -0,0 +1,32 @@ +check()) { + return redirect(RouteServiceProvider::HOME); + } + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php new file mode 100644 index 0000000..88cadca --- /dev/null +++ b/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,19 @@ + + */ + protected $except = [ + 'current_password', + 'password', + 'password_confirmation', + ]; +} diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php new file mode 100644 index 0000000..7186414 --- /dev/null +++ b/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ + + */ + public function hosts() + { + return [ + $this->allSubdomainsOfApplicationUrl(), + ]; + } +} diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php new file mode 100644 index 0000000..3391630 --- /dev/null +++ b/app/Http/Middleware/TrustProxies.php @@ -0,0 +1,28 @@ +|string|null + */ + protected $proxies; + + /** + * The headers that should be used to detect proxies. + * + * @var int + */ + protected $headers = + Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB; +} diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php new file mode 100644 index 0000000..093bf64 --- /dev/null +++ b/app/Http/Middleware/ValidateSignature.php @@ -0,0 +1,22 @@ + + */ + protected $except = [ + // 'fbclid', + // 'utm_campaign', + // 'utm_content', + // 'utm_medium', + // 'utm_source', + // 'utm_term', + ]; +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php new file mode 100644 index 0000000..9e86521 --- /dev/null +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/app/Http/Requests/Remote/Server/StatusRequest.php b/app/Http/Requests/Remote/Server/StatusRequest.php index 1ee21e8..e63c085 100644 --- a/app/Http/Requests/Remote/Server/StatusRequest.php +++ b/app/Http/Requests/Remote/Server/StatusRequest.php @@ -2,8 +2,8 @@ namespace App\Http\Requests\Remote\Server; +use Illuminate\Foundation\Http\FormRequest; use App\Models\Server\Status; -use Anik\Form\FormRequest; class StatusRequest extends FormRequest { diff --git a/app/Http/Requests/Remote/WorkOrderRequest.php b/app/Http/Requests/Remote/WorkOrderRequest.php index 0056788..ef6f255 100644 --- a/app/Http/Requests/Remote/WorkOrderRequest.php +++ b/app/Http/Requests/Remote/WorkOrderRequest.php @@ -2,8 +2,8 @@ namespace App\Http\Requests\Remote; +use Illuminate\Foundation\Http\FormRequest; use App\Models\WorkOrder\WorkOrder; -use Anik\Form\FormRequest; class WorkOrderRequest extends FormRequest { diff --git a/app/Http/Requests/User/WorkOrder/WorkOrderRequest.php b/app/Http/Requests/User/WorkOrder/WorkOrderRequest.php index 41a72bd..2080a6f 100644 --- a/app/Http/Requests/User/WorkOrder/WorkOrderRequest.php +++ b/app/Http/Requests/User/WorkOrder/WorkOrderRequest.php @@ -2,10 +2,10 @@ namespace App\Http\Requests\User\WorkOrder; +use Illuminate\Foundation\Http\FormRequest; use App\Models\WorkOrder\WorkOrder; -use Anik\Form\FormRequest; -class WorkOrderRequest extends FormRequest +class WorkOrderReques extends FormRequest { /** * Determine if the user is authorized to make this request. @@ -25,7 +25,7 @@ public function authorize(): bool } - return WorkOrder::where('user_id', auth('api')->id())->where('id', $work_order_id)->exists(); + return WorkOrder::where('user_id', auth()->id())->where('id', $work_order_id)->exists(); return false; } diff --git a/app/Jobs/CalcModule.php b/app/Jobs/CalcModule.php index 7e9e7d0..c5ab6d3 100644 --- a/app/Jobs/CalcModule.php +++ b/app/Jobs/CalcModule.php @@ -2,10 +2,9 @@ namespace App\Jobs; +use App\Models\Module; use App\Models\Transaction; -use App\Models\Module\Module; use Illuminate\Support\Facades\Cache; -use App\Http\Controllers\Remote\ModuleController; class CalcModule extends Job { diff --git a/app/Jobs/CheckAndChargeBalance.php b/app/Jobs/CheckAndChargeBalance.php index 1c9ae88..91849cb 100644 --- a/app/Jobs/CheckAndChargeBalance.php +++ b/app/Jobs/CheckAndChargeBalance.php @@ -2,8 +2,8 @@ namespace App\Jobs; -use App\Http\Controllers\User\BalanceController; -use App\Models\User\Balance; +use App\Http\Controllers\Api\BalanceController; +use App\Models\Balance; class CheckAndChargeBalance extends Job { diff --git a/app/Jobs/ClearTasks.php b/app/Jobs/ClearTasks.php index afdff18..3e074b8 100644 --- a/app/Jobs/ClearTasks.php +++ b/app/Jobs/ClearTasks.php @@ -2,14 +2,14 @@ namespace App\Jobs; -use App\Models\User\Task; +use App\Models\Task; use Illuminate\Bus\Queueable; -// use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; - use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; +// use Illuminate\Contracts\Queue\ShouldBeUnique; + class ClearTasks implements ShouldQueue { use InteractsWithQueue, Queueable, SerializesModels; diff --git a/app/Jobs/DeleteHost.php b/app/Jobs/DeleteHost.php index dc0414e..4f68f8c 100644 --- a/app/Jobs/DeleteHost.php +++ b/app/Jobs/DeleteHost.php @@ -4,9 +4,9 @@ use App\Models\Host; use Illuminate\Bus\Queueable; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; // use Illuminate\Contracts\Queue\ShouldBeUnique; diff --git a/app/Jobs/Remote/FetchModule.php b/app/Jobs/Remote/FetchModule.php index 6b6a59d..c3c876f 100644 --- a/app/Jobs/Remote/FetchModule.php +++ b/app/Jobs/Remote/FetchModule.php @@ -3,15 +3,15 @@ namespace App\Jobs\Remote; use App\Events\ServerEvent; -use App\Models\Module\Module; -use Illuminate\Bus\Queueable; -use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\Http; -use Illuminate\Support\Facades\Cache; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; +use App\Models\Module; use GuzzleHttp\Exception\ConnectException; +use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Http; +use Illuminate\Support\Facades\Log; class FetchModule implements ShouldQueue { diff --git a/app/Jobs/Remote/Host.php b/app/Jobs/Remote/Host.php index 00c8f76..faf2bba 100644 --- a/app/Jobs/Remote/Host.php +++ b/app/Jobs/Remote/Host.php @@ -2,14 +2,14 @@ namespace App\Jobs\Remote; +use App\Models\Host as HostModel; use Illuminate\Bus\Queueable; -use Illuminate\Support\Facades\Http; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Http; // use Illuminate\Contracts\Queue\ShouldBeUnique; -use App\Models\Host as HostModel; class Host implements ShouldQueue { diff --git a/app/Jobs/Remote/PushHost.php b/app/Jobs/Remote/PushHost.php index 11faaa4..cbd29a9 100644 --- a/app/Jobs/Remote/PushHost.php +++ b/app/Jobs/Remote/PushHost.php @@ -4,10 +4,10 @@ use App\Models\Host; use Illuminate\Bus\Queueable; -use Illuminate\Support\Facades\Http; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Http; // use Illuminate\Contracts\Queue\ShouldBeUnique; diff --git a/app/Jobs/Remote/PushWorkOrder.php b/app/Jobs/Remote/PushWorkOrder.php index 88d8786..c503a64 100644 --- a/app/Jobs/Remote/PushWorkOrder.php +++ b/app/Jobs/Remote/PushWorkOrder.php @@ -3,12 +3,12 @@ namespace App\Jobs\Remote; use App\Models\WorkOrder\Reply; -use Illuminate\Bus\Queueable; use App\Models\WorkOrder\WorkOrder; -use Illuminate\Support\Facades\Http; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; // use Illuminate\Contracts\Queue\ShouldBeUnique; diff --git a/app/Jobs/Remote/WorkOrder/Reply.php b/app/Jobs/Remote/WorkOrder/Reply.php index 6aad009..bb254e4 100644 --- a/app/Jobs/Remote/WorkOrder/Reply.php +++ b/app/Jobs/Remote/WorkOrder/Reply.php @@ -2,16 +2,16 @@ namespace App\Jobs\Remote\WorkOrder; -use Log; use App\Events\UserEvent; +use App\Models\WorkOrder\Reply as WorkOrderReply; use Illuminate\Bus\Queueable; -use Illuminate\Support\Facades\Http; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Http; +use Log; // use Illuminate\Contracts\Queue\ShouldBeUnique; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Contracts\Queue\ShouldQueue; -use App\Models\WorkOrder\Reply as WorkOrderReply; class Reply implements ShouldQueue { diff --git a/app/Jobs/Remote/WorkOrder/WorkOrder.php b/app/Jobs/Remote/WorkOrder/WorkOrder.php index d1d2d4a..2c9448c 100644 --- a/app/Jobs/Remote/WorkOrder/WorkOrder.php +++ b/app/Jobs/Remote/WorkOrder/WorkOrder.php @@ -3,13 +3,14 @@ namespace App\Jobs\Remote\WorkOrder; use App\Events\UserEvent; -use Illuminate\Bus\Queueable; -use Illuminate\Support\Facades\Http; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; -// use Illuminate\Contracts\Queue\ShouldBeUnique; -use Illuminate\Contracts\Queue\ShouldQueue; use App\Models\WorkOrder\WorkOrder as WorkOrderWorkOrder; +use Illuminate\Bus\Queueable; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Http; + +// use Illuminate\Contracts\Queue\ShouldBeUnique; class WorkOrder implements ShouldQueue { diff --git a/app/Jobs/SendThisMonthModuleEarnings.php b/app/Jobs/SendThisMonthModuleEarnings.php index be654e6..72476a3 100644 --- a/app/Jobs/SendThisMonthModuleEarnings.php +++ b/app/Jobs/SendThisMonthModuleEarnings.php @@ -2,7 +2,7 @@ namespace App\Jobs; -use App\Models\Module\Module; +use App\Models\Module; use App\Notifications\ModuleEarnings; use Illuminate\Support\Facades\Cache; diff --git a/app/Models/AccessToken.php b/app/Models/AccessToken.php deleted file mode 100644 index 63fd857..0000000 --- a/app/Models/AccessToken.php +++ /dev/null @@ -1,14 +0,0 @@ -belongsTo(User::class); - } -} diff --git a/app/Models/Admin/Admin.php b/app/Models/Admin/Admin.php deleted file mode 100644 index 0856a11..0000000 --- a/app/Models/Admin/Admin.php +++ /dev/null @@ -1,43 +0,0 @@ -attributes['password'] = Crypt::encrypt($value); - } - - // before create admin, generate api_token - public static function boot() - { - parent::boot(); - self::creating(function ($admin) { - - // if not set api_token - if (!$admin->api_token) { - $admin->api_token = Str::random(60); - } - - }); - } -} diff --git a/app/Models/User/Balance.php b/app/Models/Balance.php similarity index 64% rename from app/Models/User/Balance.php rename to app/Models/Balance.php index 1b364ca..b975ecc 100644 --- a/app/Models/User/Balance.php +++ b/app/Models/Balance.php @@ -1,14 +1,16 @@ belongsTo(User::class); } diff --git a/app/Models/Host.php b/app/Models/Host.php index f8d413e..5556009 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -3,18 +3,20 @@ namespace App\Models; use App\Events\UserEvent; -use App\Models\Transaction; -use App\Models\Module\Module; -// use Illuminate\Database\Eloquent\SoftDeletes; -use App\Models\WorkOrder\WorkOrder; -use Illuminate\Support\Facades\Cache; -use Illuminate\Database\Eloquent\Model; use App\Exceptions\User\BalanceNotEnoughException; +use App\Models\WorkOrder\WorkOrder; +use GeneaLabs\LaravelModelCaching\Traits\Cachable; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo as BelongsToAlias; +use Illuminate\Database\Eloquent\Relations\HasMany as HasManyAlias; +use Illuminate\Support\Facades\Cache; + +// use Illuminate\Database\Eloquent\SoftDeletes; class Host extends Model { - use HasFactory; + use HasFactory, Cachable; protected $table = 'hosts'; @@ -38,38 +40,30 @@ class Host extends Model // get user hosts public function getUserHosts($user_id = null) { - return Cache::remember('user_hosts_' . $user_id ?? auth()->id(), 3600, function () use ($user_id) { - return $this->where('user_id', $user_id)->with('module', function ($query) { - $query->select(['id', 'name']); - })->get(); - }); + return $this->where('user_id', $user_id)->with('module', function ($query) { + $query->select(['id', 'name']); + })->get(); } // user - public function user() + public function user(): BelongsToAlias { return $this->belongsTo(User::class); } // module - public function module() + public function module(): BelongsToAlias { return $this->belongsTo(Module::class); } // workOrders - public function workOrders() + public function workOrders(): HasManyAlias { return $this->hasMany(WorkOrder::class); } - // module 远程一对一 - // public function module() { - // return $this->hasOneThrough(Module::class, ProviderModule::class); - // } - - // scope public function scopeActive($query) { @@ -87,7 +81,7 @@ public function scopeThisUser($query, $module = null) // cost - public function cost($price = null, $auto = true) + public function cost($price = null, $auto = true): bool { $this->load('user'); diff --git a/app/Models/Module/Module.php b/app/Models/Module.php similarity index 82% rename from app/Models/Module/Module.php rename to app/Models/Module.php index 7876aef..0e68ffb 100644 --- a/app/Models/Module/Module.php +++ b/app/Models/Module.php @@ -1,23 +1,15 @@ user(); + $user = auth()->user(); $http = Http::remote($this->api_token, $this->url) ->accept('application/json'); @@ -157,13 +149,13 @@ public function check($module_id = null) } - // get cached modules - public static function cached_modules() - { - return Cache::remember('modules', 600, function () { - return Module::all(); - }); - } + // // get cached modules + // public static function cached_modules() + // { + // return Cache::remember('modules', 600, function () { + // return Module::all(); + // }); + // } protected static function boot() { diff --git a/app/Models/User/Task.php b/app/Models/Task.php similarity index 90% rename from app/Models/User/Task.php rename to app/Models/Task.php index 04e4493..e2a14ce 100644 --- a/app/Models/User/Task.php +++ b/app/Models/Task.php @@ -1,18 +1,20 @@ user_id); + // Cache::forget('user_tasks_' . $model->user_id); $model->load('host'); broadcast(new UserEvent($model->user_id, 'tasks.updated', $model)); @@ -110,7 +112,7 @@ protected static function boot() static::deleted(function ($model) { - Cache::forget('user_tasks_' . $model->user_id); + // Cache::forget('user_tasks_' . $model->user_id); broadcast(new UserEvent($model->user_id, 'tasks.deleted', $model)); }); diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index 2d3d14d..bf8821f 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -3,11 +3,11 @@ namespace App\Models; use App\Exceptions\ChargeException; -use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\Cache; -use Jenssegers\Mongodb\Eloquent\Model; use App\Exceptions\User\BalanceNotEnoughException; use Illuminate\Contracts\Cache\LockTimeoutException; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Log; +use Jenssegers\Mongodb\Eloquent\Model; class Transaction extends Model { diff --git a/app/Models/User.php b/app/Models/User.php index cf257ad..9895122 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,41 +2,40 @@ namespace App\Models; -use App\Models\Transaction; +// use Illuminate\Contracts\Auth\MustVerifyEmail; use App\Exceptions\CommonException; -use Illuminate\Auth\Authenticatable; -use Laravel\Lumen\Auth\Authorizable; -use Illuminate\Support\Facades\Cache; -use Illuminate\Database\Eloquent\Model; use App\Exceptions\User\BalanceNotEnoughException; +use GeneaLabs\LaravelModelCaching\Traits\Cachable; use Illuminate\Contracts\Cache\LockTimeoutException; use Illuminate\Database\Eloquent\Factories\HasFactory; -use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; -use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; +use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; +use Illuminate\Support\Facades\Cache; +use Laravel\Sanctum\HasApiTokens; -class User extends Model implements AuthenticatableContract, AuthorizableContract +class User extends Authenticatable { - use Authenticatable, Authorizable, HasFactory; + use HasApiTokens, HasFactory, Notifiable, Cachable; /** * The attributes that are mass assignable. * - * @var string[] + * @var array */ protected $fillable = [ 'name', 'email', 'password', - 'balance' ]; /** - * The attributes excluded from the model's JSON form. + * The attributes that should be hidden for serialization. * - * @var string[] + * @var array */ protected $hidden = [ - 'password', 'remember_token', + 'password', + 'remember_token', ]; protected $casts = [ diff --git a/app/Models/User/Drop.php b/app/Models/User/Drop.php deleted file mode 100644 index 3ed4382..0000000 --- a/app/Models/User/Drop.php +++ /dev/null @@ -1,96 +0,0 @@ - 'double', - 'total' => 'double', - 'rate' => 'integer', - 'status' => 'boolean', - ]; - - // user - public function user() - { - return $this->belongsTo(User::class); - } - - // before create - public static function boot() - { - parent::boot(); - self::creating(function ($drops) { - // if not admin auth guard - if (!auth()->guard('admin')->check()) { - $drops->user_id = auth()->id(); - } - - - $rate = config('drops.rate') ; - $drops->total = $drops->amount * $rate; - - $this->cache_key = 'user_' . $drops->user_id; - - // if cache has user - - // if (Cache::has($this->cache_key)) { - // // if user is not instances of Model - // $user = Cache::get($this->cache_key); - // if ($user instanceof User) { - // $this->await($this->cache_key, function () use ($user) { - // $user->save(); - // }); - // } - - // // delete cache - // Cache::forget($this->cache_key); - // } - }); - - // created - self::created(function ($drops) { - $drop = new self(); - $drop->await('user_' . $drops->user_id, function () use ($drops) { - $cache = Cache::tags(['users']); - $drops->load('user'); - $cache_key = 'user_' . $drops->user_id; - - // if cache has user - if ($cache->has($cache_key)) { - $user = $cache->get($cache_key); - if (!($user instanceof User)) { - $user = $drops->user; - } - - $user->drops += $drops->total; - - - $cache->put($cache_key, $user, 600); - - $user->save(); - } else { - $drops->user->drops += $drops->total; - $drops->user->save(); - } - }); - }); - } -} diff --git a/app/Models/User/Message.php b/app/Models/User/Message.php deleted file mode 100644 index 2346883..0000000 --- a/app/Models/User/Message.php +++ /dev/null @@ -1,11 +0,0 @@ -workOrder->status == 'pending' || $model->workOrder->status == 'error', CommonException::class, '工单状态不正确'); // change work order status - if (auth('api')->check()) { + if (auth()->check()) { $model->user_id = auth()->id(); $model->workOrder->status = 'user_replied'; } diff --git a/app/Models/WorkOrder/WorkOrder.php b/app/Models/WorkOrder/WorkOrder.php index 1156416..53c5858 100644 --- a/app/Models/WorkOrder/WorkOrder.php +++ b/app/Models/WorkOrder/WorkOrder.php @@ -2,16 +2,17 @@ namespace App\Models\WorkOrder; -use App\Models\Host; -use App\Models\User; -use App\Models\Module\Module; use App\Exceptions\CommonException; -use Illuminate\Database\Eloquent\Model; +use App\Models\Host; +use App\Models\Module; +use App\Models\User; +use GeneaLabs\LaravelModelCaching\Traits\Cachable; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; class WorkOrder extends Model { - use HasFactory; + use HasFactory, Cachable; protected $table = 'work_orders'; @@ -25,23 +26,24 @@ class WorkOrder extends Model ]; // user - public function user() { + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo + { return $this->belongsTo(User::class); } // replies - public function replies() + public function replies(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Reply::class); } // host - public function host() + public function host(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Host::class); } - public function module() + public function module(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Module::class); } @@ -71,8 +73,8 @@ protected static function boot() } // if logged - if (auth('api')->check()) { - $model->user_id = auth('api')->id(); + if (auth()->check()) { + $model->user_id = auth()->id(); if ($model->host_id) { if (!$model->user_id === $model->host->user_id) { @@ -97,37 +99,9 @@ protected static function boot() } }); - // 更新时获取差异部分 - static::updating(function ($model) { - // $original = $model->getOriginal(); - // // dd($original); - // $diff = array_diff_assoc($model->attributes, $original); - - // // 如果更新了host_id,则抛出异常 - // if (isset($diff['host_id'])) { - // throw new CommonException('host_id cannot be updated'); - // } - - }); - // updated static::updated(function ($model) { dispatch(new \App\Jobs\Remote\WorkOrder\WorkOrder($model, 'put')); - - // $original = $model->getOriginal(); - // $diff = array_diff_assoc($model->attributes, $original); - // // dd($diff); - // if (isset($diff['status'])) { - // $model->load(['host']); - // $model->host->load('module'); - // $module = $model->host->module; - // if ($module === null) { - // $model->status = 'open'; - // } else { - // $model->status = 'pending'; - // } - // $model->save(); - // } }); } } diff --git a/app/Notifications/ModuleEarnings.php b/app/Notifications/ModuleEarnings.php deleted file mode 100644 index 539a3b6..0000000 --- a/app/Notifications/ModuleEarnings.php +++ /dev/null @@ -1,66 +0,0 @@ -module = $module; - } - - /** - * Get the mail representation of the notification. - * - * @param mixed $notifiable - * @return \Illuminate\Notifications\Messages\MailMessage - */ - public function toGroup($notifiable) - { - if (!isset($notifiable['transactions'])) { - return; - } - - $module = $this->module; - - $view = 'notifications.module.earnings'; - - // make wecom_key visible - $wecom_key = $module->wecom_key ?? config('settings.wecom.robot_hook.billing'); - - $resp = Http::post('https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=' . $wecom_key, [ - 'msgtype' => 'markdown', - 'markdown' => [ - 'content' => view($view, [ - 'module' => $module, - 'data' => $notifiable, - ])->render(), - ], - ]); - - if ($resp->failed()) { - Log::error('发送模块盈利到企业微信时失败', [ - 'module' => $module->id, - 'data' => $notifiable, - 'resp' => $resp->json(), - ]); - } - } -} diff --git a/app/Notifications/UserBalanceNotification.php b/app/Notifications/UserBalanceNotification.php deleted file mode 100644 index 6898445..0000000 --- a/app/Notifications/UserBalanceNotification.php +++ /dev/null @@ -1,69 +0,0 @@ -paid_at !== null) { - $view = 'notifications.user.balance'; - $notifiable->load('user'); - $user = $notifiable->user; - - - $wecom_key = config('settings.wecom.robot_hook.billing'); - - - $data = [ - 'balance' => $notifiable, - 'user' => $user, - ]; - - $resp = Http::post('https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=' . $wecom_key, [ - 'msgtype' => 'markdown', - 'markdown' => [ - 'content' => view($view, $data)->render(), - ], - ]); - - if (!$resp->successful()) { - Log::error('企业微信机器人发送失败', $data); - } - } - } - } -} diff --git a/app/Notifications/WorkOrderNotification.php b/app/Notifications/WorkOrderNotification.php deleted file mode 100644 index fc8a9b8..0000000 --- a/app/Notifications/WorkOrderNotification.php +++ /dev/null @@ -1,102 +0,0 @@ -load(['module', 'user']); - - $module = $workOrder->module; - } elseif ($notifiable instanceof Reply) { - - $view = 'notifications.work_order.reply'; - - - $workOrder->load(['workOrder', 'user']); - $workOrder->workOrder->load('module'); - - $reply = $workOrder; - $workOrder = $workOrder->workOrder; - - $module = $workOrder->module; - } else { - return; - } - - // 取消隐藏字段 - $module->makeVisible(['wecom_key']); - - if ($module->wecom_key == null) { - $wecom_key = config('settings.wecom.robot_hook.default'); - } else { - $wecom_key = $module->wecom_key; - } - - // 隐藏字段 - $module->makeHidden(['wecom_key']); - - - $resp = Http::post('https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=' . $wecom_key, [ - 'msgtype' => 'markdown', - 'markdown' => [ - 'content' => view($view, [ - 'workOrder' => $workOrder, - 'user' => $workOrder->user, - 'reply' => $reply, - 'module' => $module, - ])->render(), - ], - ]); - - if (!$resp->successful()) { - Log::error('企业微信机器人发送失败', [ - 'resp' => $resp->json(), - 'workOrder' => $workOrder, - 'reply' => $reply, - 'module' => $module, - ]); - } - } -} diff --git a/app/Observers/BalanceObserve.php b/app/Observers/BalanceObserve.php deleted file mode 100644 index 5871020..0000000 --- a/app/Observers/BalanceObserve.php +++ /dev/null @@ -1,68 +0,0 @@ -toGroup($balance); - } - - /** - * Handle the Balance "updated" event. - * - * @param \App\Models\User\Balance $balance - * @return void - */ - public function updated(Balance $balance) - { - // - return (new UserBalanceNotification()) - ->toGroup($balance); - } - - /** - * Handle the Balance "deleted" event. - * - * @param \App\Models\User\Balance $balance - * @return void - */ - public function deleted(Balance $balance) - { - // - } - - /** - * Handle the Balance "restored" event. - * - * @param \App\Models\User\Balance $balance - * @return void - */ - public function restored(Balance $balance) - { - // - } - - /** - * Handle the Balance "force deleted" event. - * - * @param \App\Models\User\Balance $balance - * @return void - */ - public function forceDeleted(Balance $balance) - { - // - } -} diff --git a/app/Observers/WorkOrder/ReplyObserver.php b/app/Observers/WorkOrder/ReplyObserver.php deleted file mode 100644 index ffbd8b7..0000000 --- a/app/Observers/WorkOrder/ReplyObserver.php +++ /dev/null @@ -1,66 +0,0 @@ -toGroup($reply); - } - - /** - * Handle the Reply "updated" event. - * - * @param \App\Models\WorkOrder\Reply $reply - * @return void - */ - public function updated(Reply $reply) - { - // - } - - /** - * Handle the Reply "deleted" event. - * - * @param \App\Models\WorkOrder\Reply $reply - * @return void - */ - public function deleted(Reply $reply) - { - // - } - - /** - * Handle the Reply "restored" event. - * - * @param \App\Models\WorkOrder\Reply $reply - * @return void - */ - public function restored(Reply $reply) - { - // - } - - /** - * Handle the Reply "force deleted" event. - * - * @param \App\Models\WorkOrder\Reply $reply - * @return void - */ - public function forceDeleted(Reply $reply) - { - // - } -} diff --git a/app/Observers/WorkOrder/WorkOrderObserver.php b/app/Observers/WorkOrder/WorkOrderObserver.php deleted file mode 100644 index 7cfd9ff..0000000 --- a/app/Observers/WorkOrder/WorkOrderObserver.php +++ /dev/null @@ -1,71 +0,0 @@ -toGroup($workOrder); - } - - /** - * Handle the WorkOrder "updated" event. - * - * @param \App\Models\WorkOrder\WorkOrder $workOrder - * @return void - */ - public function updated(WorkOrder $workOrder) - { - - Log::debug('workOrder updated', ['workOrder' => $workOrder]); - // - return (new WorkOrderNotification()) - ->toGroup($workOrder); - } - - /** - * Handle the WorkOrder "deleted" event. - * - * @param \App\Models\WorkOrder\WorkOrder $workOrder - * @return void - */ - public function deleted(WorkOrder $workOrder) - { - // - } - - /** - * Handle the WorkOrder "restored" event. - * - * @param \App\Models\WorkOrder\WorkOrder $workOrder - * @return void - */ - public function restored(WorkOrder $workOrder) - { - // - } - - /** - * Handle the WorkOrder "force deleted" event. - * - * @param \App\Models\WorkOrder\WorkOrder $workOrder - * @return void - */ - public function forceDeleted(WorkOrder $workOrder) - { - // - } -} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index bc4909a..6e2b4b6 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,10 +3,8 @@ namespace App\Providers; use Illuminate\Support\Facades\Http; -// use Illuminate\Support\Facades\Storage; use Illuminate\Support\ServiceProvider; - class AppServiceProvider extends ServiceProvider { /** @@ -17,26 +15,17 @@ class AppServiceProvider extends ServiceProvider public function register() { // - - require_once app()->basePath('app') . '/Helpers.php'; } + /** + * Bootstrap any application services. + * + * @return void + */ public function boot() { - $this->generateInstanceId(); - - - // $this->app->make(\Illuminate\Notifications\ChannelManager::class)->extend('your-channel', function () { - // return $this->app->make(App\Channels\YourChannel::class); - // }); - // - // header('server: Cluster Ready!'); - // header('x-powered-by: LaeCloud'); - // header('x-for-you: Code is Poetry.'); - - Http::macro('remote', function ($api_token, $url) { // 关闭证书验证 return Http::withoutVerifying()->withHeaders([ @@ -46,62 +35,5 @@ public function boot() 'version' => 2, ])->baseUrl($url); }); - - // $wechat_pay_config = [ - // 'mch_id' => config('payment.wepay.mch_id'), - - // // 商户证书 - // 'private_key' => __DIR__ . '/certs/apiclient_key.pem', - // 'certificate' => __DIR__ . '/certs/apiclient_cert.pem', - - // // v3 API 秘钥 - // 'secret_key' => - // config('payment.wepay.v3_secret_key'), - - // // v2 API 秘钥 - // 'v2_secret_key' => config('payment.wepay.v2_secret_key'), - - // // 平台证书:微信支付 APIv3 平台证书,需要使用工具下载 - // // 下载工具:https://github.com/wechatpay-apiv3/CertificateDownloader - // 'platform_certs' => [ - // // '/path/to/wechatpay/cert.pem', - // ], - - // /** - // * 接口请求相关配置,超时时间等,具体可用参数请参考: - // * https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php - // */ - // 'http' => [ - // 'throw' => true, // 状态码非 200、300 时是否抛出异常,默认为开启 - // 'timeout' => 5.0, - // ], - // ]; - - // $app = new WePay($wechat_pay_config); - - // // mount app to global - // app()->instance('wepay', $app); - } - - - public function generateInstanceId() - { - if (config('app.instance_id') == null) { - $instance_id = uniqid(); - - // 获取 .env 目录 - $env_path = dirname(__DIR__) . '/../.env'; - - // 追加到 .env 文件 - file_put_contents($env_path, PHP_EOL . "INSTANCE_ID={$instance_id}", FILE_APPEND); - - // 重新加载配置 - config(['app.instance_id' => $instance_id]); - - // $env = file_get_contents(app()->environmentFilePath()); - // $env = preg_replace('/INSTANCE_ID=(.*)/', 'INSTANCE_ID=' . $instance_id, $env); - // file_put_contents(app()->environmentFilePath(), $env); - - } } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index fb1b31f..33b83f5 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,81 +2,29 @@ namespace App\Providers; -use App\Models\AccessToken; -use App\Models\Module\Module; -use App\Models\User; -use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\Gate; -use Illuminate\Support\ServiceProvider; +// use Illuminate\Support\Facades\Gate; +use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; class AuthServiceProvider extends ServiceProvider { /** - * Register any application services. + * The model to policy mappings for the application. * - * @return void + * @var array */ - public function register() - { - // - } + protected $policies = [ + // 'App\Models\Model' => 'App\Policies\ModelPolicy', + ]; /** - * Boot the authentication services for the application. + * Register any authentication / authorization services. * * @return void */ public function boot() { - // Here you may define how you wish users to be authenticated for your Lumen - // application. The callback which receives the incoming request instance - // should return either a User instance or null. You're free to obtain - // the User instance via an API token or any other method necessary. + $this->registerPolicies(); - - // api guard and remote - - $this->app['auth']->viaRequest('api', function ($request) { - // if ($request->input('api_token')) { - // return AccessToken::where('token', $request->input('api_token'))->with('user')->first()->user ?? null; - // } - // bearerToken - $bearerToken = $request->bearerToken(); - - if ($bearerToken) { - return Cache::remember('api_token_' . $bearerToken, 60, function () use ($bearerToken) { - return AccessToken::where('token', $bearerToken)->with('user')->first()->user ?? null; - }); - } else { - return null; - } - - // if ($request->input('api_token')) { - // return User::where('api_token', $request->input('api_token'))->first(); - // } - }); - - $this->app['auth']->viaRequest('remote', function ($request) { - - // if ($request->input('api_token')) { - // return Module::where('api_token', $request->input('api_token'))->first(); - // } - // bearerToken - $bearerToken = $request->bearerToken(); - - if ($bearerToken) { - return Cache::remember('remote_api_token_' . $bearerToken, 60, function () use ($bearerToken) { - return Module::where('token', $bearerToken)->first() ?? null; - }); - } else { - return null; - } - - - - // if ($request->input('api_token')) { - // return User::where('api_token', $request->input('api_token'))->first(); - // } - }); + // } } diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index ebc265e..395c518 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -2,12 +2,20 @@ namespace App\Providers; +use Illuminate\Support\Facades\Broadcast; use Illuminate\Support\ServiceProvider; class BroadcastServiceProvider extends ServiceProvider { + /** + * Bootstrap any application services. + * + * @return void + */ public function boot() { + Broadcast::routes(); + require base_path('routes/channels.php'); } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 87fcb03..474b6c1 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,21 +2,33 @@ namespace App\Providers; -use Laravel\Lumen\Providers\EventServiceProvider as ServiceProvider; +use Illuminate\Auth\Events\Registered; +use Illuminate\Auth\Listeners\SendEmailVerificationNotification; +use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class EventServiceProvider extends ServiceProvider { /** - * The event listener mappings for the application. + * The event to listener mappings for the application. * - * @var array + * @var array> */ protected $listen = [ - // \App\Events\WorkOrderProcessed::class => [ - // \App\Listeners\SendWorkOrderNotification::class, - // ], + Registered::class => [ + SendEmailVerificationNotification::class, + ], ]; + /** + * Register any events for your application. + * + * @return void + */ + public function boot() + { + // + } + /** * Determine if events and listeners should be automatically discovered. * @@ -26,12 +38,4 @@ public function shouldDiscoverEvents() { return false; } - - public function boot() { - parent::boot(); - - \App\Models\WorkOrder\WorkOrder::observe(\App\Observers\WorkOrder\WorkOrderObserver::class); - \App\Models\WorkOrder\Reply::observe(\App\Observers\WorkOrder\ReplyObserver::class); - \App\Models\User\Balance::observe(\App\Observers\BalanceObserve::class); - } } diff --git a/app/Providers/RouteBindingServiceProvider.php b/app/Providers/RouteBindingServiceProvider.php deleted file mode 100644 index 97b796a..0000000 --- a/app/Providers/RouteBindingServiceProvider.php +++ /dev/null @@ -1,37 +0,0 @@ -binder; - - $binder->implicitBind('App\Models'); - $binder->implicitBind('App\Models\Module'); - $binder->implicitBind('App\Models\Admin'); - $binder->implicitBind('App\Models\Server'); - $binder->implicitBind('App\Models\User'); - $binder->implicitBind('App\Models\WorkOrder'); - - // Here we define our bindings - // $binder->bind('user', 'App\Models\User'); - // $binder->bind( - // 'module', - // 'App\Models\Module\Module' - // ); - // $binder->bind( - // 'workOrder', - // 'App\Models\WorkOrder\WorkOrder' - // ); - // $binder->bind('reply', 'App\Models\WorkOrder\Reply'); - // $binder->bind('task', 'App\Models\'); - } -} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..e41f765 --- /dev/null +++ b/app/Providers/RouteServiceProvider.php @@ -0,0 +1,52 @@ +configureRateLimiting(); + + $this->routes(function () { + Route::middleware(['api', 'auth:sanctum']) + ->prefix('api') + ->group(base_path('routes/api.php')); + + Route::middleware('web') + ->group(base_path('routes/web.php')); + }); + } + + /** + * Configure the rate limiters for the application. + * + * @return void + */ + protected function configureRateLimiting() + { + RateLimiter::for('api', function (Request $request) { + return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); + }); + } +} diff --git a/artisan b/artisan index 6a9d095..67a3329 100755 --- a/artisan +++ b/artisan @@ -1,21 +1,23 @@ #!/usr/bin/env php make( - 'Illuminate\Contracts\Console\Kernel' +$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput ); -exit($kernel->handle(new ArgvInput, new ConsoleOutput)); +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running, we will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$kernel->terminate($input, $status); + +exit($status); diff --git a/bin/fswatch b/bin/fswatch deleted file mode 100755 index dd60014..0000000 --- a/bin/fswatch +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -WORK_DIR=$1 -if [ ! -n "${WORK_DIR}" ] ;then - WORK_DIR="." -fi - -echo "Restarting LaravelS..." -./bin/laravels restart -d -i - -echo "Starting fswatch..." -LOCKING=0 -fswatch -e ".*" -i "\\.php$" -r ${WORK_DIR} | while read file -do - if [[ ! ${file} =~ .php$ ]] ;then - continue - fi - if [ ${LOCKING} -eq 1 ] ;then - echo "Reloading, skipped." - continue - fi - echo "File ${file} has been modified." - LOCKING=1 - ./bin/laravels reload - LOCKING=0 -done -exit 0 \ No newline at end of file diff --git a/bin/inotify b/bin/inotify deleted file mode 100755 index ea3a3bd..0000000 --- a/bin/inotify +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -WORK_DIR=$1 -if [ ! -n "${WORK_DIR}" ] ;then - WORK_DIR="." -fi - -echo "Restarting LaravelS..." -./bin/laravels restart -d -i - -echo "Starting inotifywait..." -LOCKING=0 - -inotifywait --event modify --event create --event move --event delete -mrq ${WORK_DIR} | while read file - -do - if [[ ! ${file} =~ .php$ ]] ;then - continue - fi - if [ ${LOCKING} -eq 1 ] ;then - echo "Reloading, skipped." - continue - fi - echo "File ${file} has been modified." - LOCKING=1 - ./bin/laravels reload - LOCKING=0 -done -exit 0 \ No newline at end of file diff --git a/bin/laravels b/bin/laravels deleted file mode 100755 index c17313e..0000000 --- a/bin/laravels +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env php -prefixes[$prefix]) === false) { - $this->prefixes[$prefix] = []; - } - - // retain the base directory for the namespace prefix - if ($prepend) { - array_unshift($this->prefixes[$prefix], $base_dir); - } else { - $this->prefixes[$prefix][] = $base_dir; - } - } - - /** - * Loads the class file for a given class name. - * - * @param string $class The fully-qualified class name. - * @return mixed The mapped file name on success, or boolean false on - * failure. - */ - public function loadClass($class) - { - // the current namespace prefix - $prefix = $class; - - // work backwards through the namespace names of the fully-qualified - // class name to find a mapped file name - while (false !== $pos = strrpos($prefix, '\\')) { - // retain the trailing namespace separator in the prefix - $prefix = substr($class, 0, $pos + 1); - - // the rest is the relative class name - $relative_class = substr($class, $pos + 1); - - // try to load a mapped file for the prefix and relative class - $mapped_file = $this->loadMappedFile($prefix, $relative_class); - if ($mapped_file) { - return $mapped_file; - } - - // remove the trailing namespace separator for the next iteration - // of strrpos() - $prefix = rtrim($prefix, '\\'); - } - - // never found a mapped file - return false; - } - - /** - * Load the mapped file for a namespace prefix and relative class. - * - * @param string $prefix The namespace prefix. - * @param string $relative_class The relative class name. - * @return mixed Boolean false if no mapped file can be loaded, or the - * name of the mapped file that was loaded. - */ - protected function loadMappedFile($prefix, $relative_class) - { - // are there any base directories for this namespace prefix? - if (isset($this->prefixes[$prefix]) === false) { - return false; - } - - // look through base directories for this namespace prefix - foreach ($this->prefixes[$prefix] as $base_dir) { - // replace the namespace prefix with the base directory, - // replace namespace separators with directory separators - // in the relative class name, append with .php - $file = $base_dir - . str_replace('\\', '/', $relative_class) - . '.php'; - - // if the mapped file exists, require it - if ($this->requireFile($file)) { - // yes, we're done - return $file; - } - } - - // never found it - return false; - } - - /** - * If a file exists, require it from the file system. - * - * @param string $file The file to require. - * @return bool True if the file exists, false if not. - */ - public function requireFile($file) - { - if (file_exists($file)) { - require $file; - return true; - } - return false; - } -} - -$basePath = dirname(__DIR__) . '/'; -$loader = new Psr4Autoloader(); -$loader->register(); - -// Register laravel-s -$loader->addNamespace('Hhxsv5\LaravelS', $basePath . '/vendor/hhxsv5/laravel-s/src'); - -// Register laravel-s dependencies - -// To fix issue #364 https://github.com/hhxsv5/laravel-s/issues/364 -$loader->addNamespace('Symfony\Polyfill\Php80', $basePath . '/vendor/symfony/polyfill-php80'); -$loader->requireFile($basePath . '/vendor/symfony/polyfill-php80/bootstrap.php'); - -$loader->addNamespace('Symfony\Component\Console', $basePath . '/vendor/symfony/console'); -$loader->addNamespace('Symfony\Contracts\Service', $basePath . '/vendor/symfony/service-contracts'); -$loader->addNamespace('Symfony\Contracts', $basePath . '/vendor/symfony/contracts'); - -$command = new Hhxsv5\LaravelS\Console\Portal($basePath); -$input = new Symfony\Component\Console\Input\ArgvInput(); -$output = new Symfony\Component\Console\Output\ConsoleOutput(); -$code = $command->run($input, $output); -exit($code); \ No newline at end of file diff --git a/bootstrap/app.php b/bootstrap/app.php index c2c497d..037e17d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,50 +1,34 @@ bootstrap(); - -date_default_timezone_set(env('APP_TIMEZONE', 'PRC')); - /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | -| Here we will load the environment and create the application instance -| that serves as the central piece of this framework. We'll use this -| application as an "IoC" container and router for this framework. +| The first thing we will do is create a new Laravel application instance +| which serves as the "glue" for all the components of Laravel, and is +| the IoC container for the system binding all of the various parts. | */ -$app = new Laravel\Lumen\Application( - dirname(__DIR__) +$app = new Illuminate\Foundation\Application( + $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); -$app->withFacades(); - - -$app->register(Jenssegers\Mongodb\MongodbServiceProvider::class); - - -$app->withEloquent(); - /* |-------------------------------------------------------------------------- -| Register Container Bindings +| Bind Important Interfaces |-------------------------------------------------------------------------- | -| Now we will register a few bindings in the service container. We will -| register the exception handler and the console kernel. You may add -| your own bindings here if you like or you can make another file. +| Next, we need to bind some important interfaces into the container so +| we will be able to resolve them when needed. The kernels serve the +| incoming requests to this application from both the web and CLI. | */ $app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class ); $app->singleton( @@ -52,131 +36,20 @@ App\Console\Kernel::class ); -$app->singleton('filesystem', function ($app) { - $app->alias('filesystem', Illuminate\Contracts\Filesystem\Factory::class); - return $app->loadComponent( - 'filesystems', - Illuminate\Filesystem\FilesystemServiceProvider::class, - 'filesystem' - ); -}); - - - +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class +); /* |-------------------------------------------------------------------------- -| Register Config Files +| Return The Application |-------------------------------------------------------------------------- | -| Now we will register the "app" configuration file. If the file exists in -| your configuration directory it will be loaded; otherwise, we'll load -| the default version. You may register other files below as needed. +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. | */ -$app->configure('app'); -$app->configure('auth'); -$app->configure('cache'); -$app->configure('database'); -$app->configure('laravels'); -$app->configure('oauth'); -$app->configure('queue'); -$app->configure('session'); -$app->configure('payment'); -$app->configure('drops'); -$app->configure('forum'); -$app->configure('broadcasting'); -$app->configure('filesystems'); -$app->configure('settings'); - -/* -|-------------------------------------------------------------------------- -| Register Middleware -|-------------------------------------------------------------------------- -| -| Next, we will register the middleware with the application. These can -| be global middleware that run before and after each request into a -| route or middleware that'll be assigned to some specific routes. -| -*/ - -$app->middleware([ - // App\Http\Middleware\ExampleMiddleware::class - \App\Http\Middleware\AllowCors::class, - // \App\Http\Middleware\LogAllRequest::class, -]); - -$app->routeMiddleware([ - 'auth' => App\Http\Middleware\Authenticate::class, - 'maintenance' => App\Http\Middleware\Maintenance::class, - // 'remote' => [ - // \Illuminate\Routing\Middleware\SubstituteBindings::class, - // \App\Http\Middleware\AllowCors::class, - // ], -]); - -/* -|-------------------------------------------------------------------------- -| Register Service Providers -|-------------------------------------------------------------------------- -| -| Here we will register all of the application's service providers which -| are used to bind services into the container. Service providers are -| totally optional, so you are not required to uncomment this line. -| -*/ - -$app->register(App\Providers\AppServiceProvider::class); -$app->register(App\Providers\AuthServiceProvider::class); -$app->register(Illuminate\Redis\RedisServiceProvider::class); -$app->register(Hhxsv5\LaravelS\Illuminate\LaravelSServiceProvider::class); -$app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class); -$app->register(App\Providers\EventServiceProvider::class); -$app->register(\Anik\Form\FormRequestServiceProvider::class); -$app->register(App\Providers\RouteBindingServiceProvider::class); -$app->register(Illuminate\Notifications\NotificationServiceProvider::class); - -// broadcast -$app->register(App\Providers\BroadcastServiceProvider::class); - -// filesystem -$app->register(Illuminate\Filesystem\FilesystemServiceProvider::class); -$app->register(Freyo\Flysystem\QcloudCOSv5\ServiceProvider::class); - - - -/* -|-------------------------------------------------------------------------- -| Load The Application Routes -|-------------------------------------------------------------------------- -| -| Next we will include the routes file so that they can all be added to -| the application. This will provide all of the URLs the application -| can respond to, as well as the controllers that may handle them. -| -*/ - -$app->router->group([ - 'namespace' => 'App\Http\Controllers', -], function ($router) { - require __DIR__ . '/../routes/web.php'; -}); - -$app->router->group([ - 'namespace' => 'App\Http\Controllers', - 'prefix' => 'api', - 'middleware' => ['maintenance', 'auth:api'], -], function ($router) { - require __DIR__ . '/../routes/api.php'; -}); - -$app->router->group([ - 'namespace' => 'App\Http\Controllers\Remote', - 'prefix' => 'remote', - 'middleware' => ['auth:remote'], -], function ($router) { - require __DIR__ . '/../routes/remote.php'; -}); - return $app; diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/composer.json b/composer.json index 26fb915..65a561f 100644 --- a/composer.json +++ b/composer.json @@ -1,37 +1,32 @@ { - "name": "laravel/lumen", - "description": "The Laravel Lumen Framework.", + "name": "laravel/laravel", + "type": "project", + "description": "The Laravel Framework.", "keywords": [ "framework", - "laravel", - "lumen" + "laravel" ], "license": "MIT", - "type": "project", "require": { - "php": "^8.0", - "alipaysdk/easysdk": "^2.0", - "anik/form-request": "^4.5", - "doctrine/dbal": "^3.3", - "flipbox/lumen-generator": "^9.1", - "freyo/flysystem-qcloud-cos-v5": "^2.0", - "guzzlehttp/guzzle": "^7.5", - "hhxsv5/laravel-s": "~3.7.0", - "illuminate/notifications": "^9.34", - "illuminate/redis": "^9.28", + "php": "^8.0.2", + "doctrine/dbal": "^3.4", + "genealabs/laravel-model-caching": "^0.12.5", + "guzzlehttp/guzzle": "^7.2", "jenssegers/mongodb": "^3.9", - "laravel/lumen-framework": "^9.0", - "league/flysystem": "^3.5", - "mmghv/lumen-route-binding": "^1.0", - "mongodb/mongodb": "^1.13", - "predis/predis": "^2.0", - "pusher/pusher-php-server": "^7.0", - "w7corp/easywechat": "^6.8" + "laravel/framework": "^9.19", + "laravel/sanctum": "^3.0", + "laravel/tinker": "^2.7", + "symfony/psr-http-message-bridge": "^2.1", + "yansongda/laravel-pay": "~3.2.0" }, "require-dev": { "fakerphp/faker": "^1.9.1", + "laravel/pint": "^1.0", + "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", - "phpunit/phpunit": "^9.5.10" + "nunomaduro/collision": "^6.1", + "phpunit/phpunit": "^9.5.10", + "spatie/laravel-ignition": "^1.0" }, "autoload": { "psr-4": { @@ -46,14 +41,32 @@ } }, "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi" + ], + "post-update-cmd": [ + "@php artisan vendor:publish --tag=laravel-assets --ansi --force" + ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "@php artisan key:generate --ansi" ] }, + "extra": { + "laravel": { + "dont-discover": [] + } + }, "config": { "optimize-autoloader": true, "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "pestphp/pest-plugin": true + } }, "minimum-stability": "dev", "prefer-stable": true diff --git a/composer.lock b/composer.lock index c930fd5..563fc6a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,304 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "348fafe400e5a446c6c7d832810b8a01", + "content-hash": "9f709e18793a5010b075e0233cbb8825", "packages": [ - { - "name": "adbario/php-dot-notation", - "version": "2.4.1", - "source": { - "type": "git", - "url": "https://github.com/adbario/php-dot-notation.git", - "reference": "3bfe67895d26697d20485343499532234eeb7c08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/3bfe67895d26697d20485343499532234eeb7c08", - "reference": "3bfe67895d26697d20485343499532234eeb7c08", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "php": "^5.5 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8|^5.7|^6.6|^7.5|^8.5|^9.5", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Adbar\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Riku Särkinen", - "email": "riku@adbar.io" - } - ], - "description": "PHP dot notation access to arrays", - "homepage": "https://github.com/adbario/php-dot-notation", - "keywords": [ - "ArrayAccess", - "dotnotation" - ], - "support": { - "issues": "https://github.com/adbario/php-dot-notation/issues", - "source": "https://github.com/adbario/php-dot-notation/tree/2.4.1" - }, - "time": "2022-08-25T19:47:20+00:00" - }, - { - "name": "alibabacloud/tea", - "version": "3.1.24", - "source": { - "type": "git", - "url": "https://github.com/aliyun/tea-php.git", - "reference": "bb33395f47db3847d1940d6eb8ba1e56cd0623cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aliyun/tea-php/zipball/bb33395f47db3847d1940d6eb8ba1e56cd0623cb", - "reference": "bb33395f47db3847d1940d6eb8ba1e56cd0623cb", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "adbario/php-dot-notation": "^2.3", - "ext-curl": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "ext-xmlwriter": "*", - "guzzlehttp/guzzle": "^6.3|^7.0", - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "*", - "symfony/dotenv": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "suggest": { - "ext-sockets": "To use client-side monitoring" - }, - "type": "library", - "autoload": { - "psr-4": { - "AlibabaCloud\\Tea\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Alibaba Cloud SDK", - "email": "sdk-team@alibabacloud.com", - "homepage": "http://www.alibabacloud.com" - } - ], - "description": "Client of Tea for PHP", - "homepage": "https://www.alibabacloud.com/", - "keywords": [ - "alibabacloud", - "client", - "cloud", - "tea" - ], - "support": { - "issues": "https://github.com/aliyun/tea-php/issues", - "source": "https://github.com/aliyun/tea-php" - }, - "time": "2022-07-18T11:27:29+00:00" - }, - { - "name": "alibabacloud/tea-fileform", - "version": "0.3.4", - "source": { - "type": "git", - "url": "https://github.com/alibabacloud-sdk-php/tea-fileform.git", - "reference": "4bf0c75a045c8115aa8cb1a394bd08d8bb833181" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alibabacloud-sdk-php/tea-fileform/zipball/4bf0c75a045c8115aa8cb1a394bd08d8bb833181", - "reference": "4bf0c75a045c8115aa8cb1a394bd08d8bb833181", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "alibabacloud/tea": "^3.0", - "php": ">5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35|^5.4.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "AlibabaCloud\\Tea\\FileForm\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Alibaba Cloud SDK", - "email": "sdk-team@alibabacloud.com" - } - ], - "description": "Alibaba Cloud Tea File Library for PHP", - "support": { - "issues": "https://github.com/alibabacloud-sdk-php/tea-fileform/issues", - "source": "https://github.com/alibabacloud-sdk-php/tea-fileform/tree/0.3.4" - }, - "time": "2020-12-01T07:24:35+00:00" - }, - { - "name": "alipaysdk/easysdk", - "version": "2.2.2", - "source": { - "type": "git", - "url": "https://github.com/alipay/alipay-easysdk.git", - "reference": "eac46450971d094e8cfb1c183da1080ca53d75b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alipay/alipay-easysdk/zipball/eac46450971d094e8cfb1c183da1080ca53d75b9", - "reference": "eac46450971d094e8cfb1c183da1080ca53d75b9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "alibabacloud/tea": "^3.1", - "alibabacloud/tea-fileform": "^0.3.2", - "ext-ctype": "*", - "ext-curl": "*", - "ext-dom": "*", - "ext-fileinfo": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "ext-xmlwriter": "*", - "guzzlehttp/guzzle": ">=6.3", - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Alipay\\EasySDK\\": "php/src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "junying.wjy", - "email": "junying.wjy@antfin.com" - } - ], - "description": "支付宝官方 Alipay Easy SDK", - "support": { - "source": "https://github.com/alipay/alipay-easysdk/tree/v2.2.2" - }, - "time": "2022-05-07T03:29:10+00:00" - }, - { - "name": "anik/form-request", - "version": "v4.5", - "source": { - "type": "git", - "url": "https://github.com/ssi-anik/form-request.git", - "reference": "6a6a1807eeb6705a5f0afaa7e4c52043e9a7c3f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ssi-anik/form-request/zipball/6a6a1807eeb6705a5f0afaa7e4c52043e9a7c3f6", - "reference": "6a6a1807eeb6705a5f0afaa7e4c52043e9a7c3f6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/support": "^6.0|^7.0|^8.0|^9.0", - "php": "^7.2|^8.0" - }, - "require-dev": { - "anik/testbench-lumen": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Anik\\Form\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Syed Sirajul Islam Anik", - "email": "sirajul.islam.anik@gmail.com" - } - ], - "description": "Form request is a package for Lumen that lets developer validate form requests like Laravel does.", - "keywords": [ - "form-request", - "lumen", - "validation" - ], - "support": { - "issues": "https://github.com/ssi-anik/form-request/issues", - "source": "https://github.com/ssi-anik/form-request/tree/v4.5" - }, - "time": "2022-05-10T06:37:37+00:00" - }, { "name": "brick/math", "version": "0.10.1", @@ -364,79 +68,6 @@ ], "time": "2022-08-01T22:54:31+00:00" }, - { - "name": "classpreloader/classpreloader", - "version": "4.2.0", - "source": { - "type": "git", - "url": "https://github.com/ClassPreloader/ClassPreloader.git", - "reference": "af9284543aedb45ed58359374918141c0ac7ae34" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/af9284543aedb45ed58359374918141c0ac7ae34", - "reference": "af9284543aedb45ed58359374918141c0ac7ae34", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-tokenizer": "*", - "nikic/php-parser": "^4.10.3", - "php": "^7.0.8 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "graham-campbell/analyzer": "^2.4.3 || ^3.0.4", - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19" - }, - "type": "library", - "autoload": { - "psr-4": { - "ClassPreloader\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk" - } - ], - "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", - "keywords": [ - "autoload", - "class", - "preload", - "preloader" - ], - "support": { - "issues": "https://github.com/ClassPreloader/ClassPreloader/issues", - "source": "https://github.com/ClassPreloader/ClassPreloader/tree/4.2.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/classpreloader/classpreloader", - "type": "tidelift" - } - ], - "time": "2021-08-28T21:56:17+00:00" - }, { "name": "dflydev/dot-access-data", "version": "v3.0.1", @@ -1203,133 +834,6 @@ ], "time": "2022-06-18T20:57:19+00:00" }, - { - "name": "flipbox/lumen-generator", - "version": "9.1.0", - "source": { - "type": "git", - "url": "https://github.com/flipboxstudio/lumen-generator.git", - "reference": "ee8e6a4feeb751369a3bbf998491143a68989be9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/flipboxstudio/lumen-generator/zipball/ee8e6a4feeb751369a3bbf998491143a68989be9", - "reference": "ee8e6a4feeb751369a3bbf998491143a68989be9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "classpreloader/classpreloader": "^3.0|^4.0|^4.2", - "illuminate/console": "^5.5|^6.0|^7.0|^8.0|^8.17|^9.0", - "illuminate/filesystem": "^5.5|^6.0|^7.0|^8.0|^8.17|^9.0", - "illuminate/support": "^5.5|^6.0|^7.0|^8.0|^8.17|^9.0", - "psy/psysh": "0.9.*|0.10.*|0.11.*", - "symfony/var-dumper": "^4.2|^4.3|^5.0|^5.1|^5.2|^6.0" - }, - "suggest": { - "anik/form-request": "Required to use form request in Lumen." - }, - "type": "library", - "autoload": { - "psr-4": { - "Flipbox\\LumenGenerator\\": "src/LumenGenerator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Krisan Alfa Timur", - "email": "krisan47@gmail.com" - } - ], - "description": "A Lumen Generator You Are Missing", - "support": { - "issues": "https://github.com/flipboxstudio/lumen-generator/issues", - "source": "https://github.com/flipboxstudio/lumen-generator/tree/9.1.0" - }, - "time": "2022-03-26T00:47:39+00:00" - }, - { - "name": "freyo/flysystem-qcloud-cos-v5", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/freyo/flysystem-qcloud-cos-v5.git", - "reference": "08c52b51405c92fb0eaa0ec560d168f432ad8582" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/freyo/flysystem-qcloud-cos-v5/zipball/08c52b51405c92fb0eaa0ec560d168f432ad8582", - "reference": "08c52b51405c92fb0eaa0ec560d168f432ad8582", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "guzzlehttp/guzzle": "~6.0 || ^7.0", - "league/flysystem": "^1.0 || ^2.0 || ^3.0", - "nesbot/carbon": "~1.0 || ^2.0", - "php": ">=5.5.0", - "qcloud/cos-sdk-v5": "^2.0 || dev-guzzle7" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Freyo\\Flysystem\\QcloudCOSv5\\ServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Freyo\\Flysystem\\QcloudCOSv5\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "freyo", - "email": "freyhsiao@gmail.com" - } - ], - "description": "Flysystem Adapter for Tencent Qcloud COS SDK V5", - "keywords": [ - "flysystem-adapter", - "qcloud", - "qcloud-cos", - "qcloud-sdk" - ], - "support": { - "issues": "https://github.com/freyo/flysystem-qcloud-cos-v5/issues", - "source": "https://github.com/freyo/flysystem-qcloud-cos-v5/tree/2.2.1" - }, - "funding": [ - { - "url": "https://opencollective.com/flysystem-qcloud-cos-v5", - "type": "open_collective" - } - ], - "time": "2022-03-27T14:18:34+00:00" - }, { "name": "fruitcake/php-cors", "version": "v1.2.0", @@ -1407,6 +911,142 @@ ], "time": "2022-02-20T15:07:15+00:00" }, + { + "name": "genealabs/laravel-model-caching", + "version": "0.12.5", + "source": { + "type": "git", + "url": "https://github.com/GeneaLabs/laravel-model-caching.git", + "reference": "3530b50db0849c74d6ab6ac1cf1f96b8ad08ba1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GeneaLabs/laravel-model-caching/zipball/3530b50db0849c74d6ab6ac1cf1f96b8ad08ba1a", + "reference": "3530b50db0849c74d6ab6ac1cf1f96b8ad08ba1a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "genealabs/laravel-pivot-events": "^9.0", + "illuminate/cache": "^9.0", + "illuminate/config": "^9.0", + "illuminate/console": "^9.0", + "illuminate/container": "^9.0", + "illuminate/database": "^9.0", + "illuminate/http": "^9.0", + "illuminate/support": "^9.0", + "php": "^8.0" + }, + "require-dev": { + "doctrine/dbal": "^3.3", + "fakerphp/faker": "^1.11", + "laravel/legacy-factories": "^1.3", + "laravel/nova": "^3.9", + "orchestra/testbench": "^7.0", + "orchestra/testbench-browser-kit": "^7.0", + "php-coveralls/php-coveralls": "^2.2", + "phpmd/phpmd": "^2.11", + "phpunit/phpunit": "^9.5", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.6", + "symfony/thanks": "^1.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "GeneaLabs\\LaravelModelCaching\\Providers\\Service" + ] + } + }, + "autoload": { + "psr-4": { + "GeneaLabs\\LaravelModelCaching\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike Bronner", + "email": "hello@genealabs.com" + } + ], + "description": "Automatic caching for Eloquent models.", + "support": { + "issues": "https://github.com/GeneaLabs/laravel-model-caching/issues", + "source": "https://github.com/GeneaLabs/laravel-model-caching/tree/0.12.5" + }, + "time": "2022-07-30T14:19:41+00:00" + }, + { + "name": "genealabs/laravel-pivot-events", + "version": "9.0.4", + "source": { + "type": "git", + "url": "https://github.com/GeneaLabs/laravel-pivot-events.git", + "reference": "3e076a8d266baf0833e7496ca4e5eb65d5df4b76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GeneaLabs/laravel-pivot-events/zipball/3e076a8d266baf0833e7496ca4e5eb65d5df4b76", + "reference": "3e076a8d266baf0833e7496ca4e5eb65d5df4b76", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/database": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0", + "symfony/thanks": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "GeneaLabs\\LaravelPivotEvents\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike Bronner", + "email": "hello@genealabs.com", + "homepage": "https://genealabs.com", + "role": "Developer" + } + ], + "description": "This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.", + "homepage": "https://github.com/GeneaLabs/laravel-pivot", + "keywords": [ + "eloquent events", + "eloquent extra events", + "laravel BelongsToMany events", + "laravel pivot events", + "laravel sync events" + ], + "support": { + "issues": "https://github.com/GeneaLabs/laravel-pivot/issues", + "source": "https://github.com/GeneaLabs/laravel-pivot" + }, + "time": "2022-03-30T12:50:17+00:00" + }, { "name": "graham-campbell/result-type", "version": "v1.0.4", @@ -1475,93 +1115,6 @@ ], "time": "2021-11-21T21:41:47+00:00" }, - { - "name": "guzzlehttp/command", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/command.git", - "reference": "7883359e0ecab8a8f7c43aad2fc36360a35d21e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/command/zipball/7883359e0ecab8a8f7c43aad2fc36360a35d21e8", - "reference": "7883359e0ecab8a8f7c43aad2fc36360a35d21e8", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "guzzlehttp/guzzle": "^7.4.1", - "guzzlehttp/promises": "^1.5.1", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.19" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Command\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - } - ], - "description": "Provides the foundation for building command-based web service clients", - "support": { - "issues": "https://github.com/guzzle/command/issues", - "source": "https://github.com/guzzle/command/tree/1.2.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/command", - "type": "tidelift" - } - ], - "time": "2022-02-08T10:21:14+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "7.5.0", @@ -1696,97 +1249,6 @@ ], "time": "2022-08-28T15:39:27+00:00" }, - { - "name": "guzzlehttp/guzzle-services", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle-services.git", - "reference": "4989d902dd4e0411b320e851c46f3c94d652d891" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/4989d902dd4e0411b320e851c46f3c94d652d891", - "reference": "4989d902dd4e0411b320e851c46f3c94d652d891", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "guzzlehttp/command": "^1.2.2", - "guzzlehttp/guzzle": "^7.4.1", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", - "guzzlehttp/uri-template": "^1.0.1", - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.19 || ^9.5.8" - }, - "suggest": { - "gimler/guzzle-description-loader": "^0.0.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Command\\Guzzle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Stefano Kowalke", - "email": "blueduck@mail.org", - "homepage": "https://github.com/Konafets" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - } - ], - "description": "Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.", - "support": { - "issues": "https://github.com/guzzle/guzzle-services/issues", - "source": "https://github.com/guzzle/guzzle-services/tree/1.3.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle-services", - "type": "tidelift" - } - ], - "time": "2022-03-03T11:21:34+00:00" - }, { "name": "guzzlehttp/promises", "version": "1.5.2", @@ -2002,2041 +1464,6 @@ ], "time": "2022-10-26T14:07:24+00:00" }, - { - "name": "guzzlehttp/uri-template", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/uri-template.git", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/b945d74a55a25a949158444f09ec0d3c120d69e2", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.2.5 || ^8.0", - "symfony/polyfill-php80": "^1.17" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.19 || ^9.5.8", - "uri-template/tests": "1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\UriTemplate\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - } - ], - "description": "A polyfill class for uri_template of PHP", - "keywords": [ - "guzzlehttp", - "uri-template" - ], - "support": { - "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", - "type": "tidelift" - } - ], - "time": "2021-10-07T12:57:01+00:00" - }, - { - "name": "hhxsv5/laravel-s", - "version": "v3.7.34", - "source": { - "type": "git", - "url": "https://github.com/hhxsv5/laravel-s.git", - "reference": "3c1ae91a7304d54b506eff4f21138408f3547dae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hhxsv5/laravel-s/zipball/3c1ae91a7304d54b506eff4f21138408f3547dae", - "reference": "3c1ae91a7304d54b506eff4f21138408f3547dae", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-pcntl": "*", - "php": ">=5.5.9", - "swoole/ide-helper": "@dev", - "symfony/console": ">=2.7.0" - }, - "require-dev": { - "phpunit/phpunit": ">=4.8.36" - }, - "suggest": { - "ext-inotify": "Inotify, used to real-time reload.", - "ext-swoole": "Coroutine-based concurrency library for PHP, require >= 1.7.19." - }, - "bin": [ - "bin/fswatch" - ], - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Hhxsv5\\LaravelS\\Illuminate\\LaravelSServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Hhxsv5\\LaravelS\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Xie Biao", - "email": "hhxsv5@sina.com" - } - ], - "description": "🚀 LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.", - "homepage": "https://github.com/hhxsv5/laravel-s", - "keywords": [ - "LaravelS", - "async", - "coroutine", - "http", - "inotify", - "laravel", - "laravel-s", - "lumen", - "performance", - "process", - "server", - "swoole", - "task", - "tcp", - "timer", - "udp", - "websocket" - ], - "support": { - "issues": "https://github.com/hhxsv5/laravel-s/issues", - "source": "https://github.com/hhxsv5/laravel-s" - }, - "funding": [ - { - "url": "https://gitee.com/hhxsv5/laravel-s?donate=true", - "type": "custom" - }, - { - "url": "https://www.blockchain.com/btc/address/367HnAzVTAEk8offesDhcsCQswnugsE54u", - "type": "custom" - }, - { - "url": "https://www.paypal.me/hhxsv5", - "type": "custom" - } - ], - "time": "2022-09-07T12:29:09+00:00" - }, - { - "name": "illuminate/auth", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/auth.git", - "reference": "f9dc630579af611e896e92a1b7e03c1f2a24ffbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/auth/zipball/f9dc630579af611e896e92a1b7e03c1f2a24ffbb", - "reference": "f9dc630579af611e896e92a1b7e03c1f2a24ffbb", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/http": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/queue": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "suggest": { - "illuminate/console": "Required to use the auth:clear-resets command (^9.0).", - "illuminate/queue": "Required to fire login / logout events (^9.0).", - "illuminate/session": "Required to use the session based guard (^9.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Auth\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Auth package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-22T08:31:38+00:00" - }, - { - "name": "illuminate/broadcasting", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/broadcasting.git", - "reference": "6ab6ae61c603a24ac3f79605a98955b85fde86ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/6ab6ae61c603a24ac3f79605a98955b85fde86ba", - "reference": "6ab6ae61c603a24ac3f79605a98955b85fde86ba", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/bus": "^9.0", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/queue": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2", - "psr/log": "^1.0|^2.0|^3.0" - }, - "suggest": { - "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Broadcasting\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Broadcasting package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-08-18T14:02:40+00:00" - }, - { - "name": "illuminate/bus", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/bus.git", - "reference": "baccdba32ec4e7d3492cfd991806a8ead397f77f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/bus/zipball/baccdba32ec4e7d3492cfd991806a8ead397f77f", - "reference": "baccdba32ec4e7d3492cfd991806a8ead397f77f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/pipeline": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "suggest": { - "illuminate/queue": "Required to use closures when chaining jobs (^7.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Bus\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Bus package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-16T19:09:47+00:00" - }, - { - "name": "illuminate/cache", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/cache.git", - "reference": "8ba188bcfad7d2b5ed13f8cd1ccbb67db22cfa04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/8ba188bcfad7d2b5ed13f8cd1ccbb67db22cfa04", - "reference": "8ba188bcfad7d2b5ed13f8cd1ccbb67db22cfa04", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "provide": { - "psr/simple-cache-implementation": "1.0|2.0|3.0" - }, - "suggest": { - "ext-memcached": "Required to use the memcache cache driver.", - "illuminate/database": "Required to use the database cache driver (^9.0).", - "illuminate/filesystem": "Required to use the file cache driver (^9.0).", - "illuminate/redis": "Required to use the redis cache driver (^9.0).", - "symfony/cache": "Required to use PSR-6 cache bridge (^6.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Cache package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-08-24T13:50:51+00:00" - }, - { - "name": "illuminate/collections", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/collections.git", - "reference": "a533ba3fce4e288a42f6287e1b9a685cdbc14f9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/a533ba3fce4e288a42f6287e1b9a685cdbc14f9f", - "reference": "a533ba3fce4e288a42f6287e1b9a685cdbc14f9f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/conditionable": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "php": "^8.0.2" - }, - "suggest": { - "symfony/var-dumper": "Required to use the dump method (^6.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Collections package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-16T14:22:26+00:00" - }, - { - "name": "illuminate/conditionable", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/conditionable.git", - "reference": "5b40f51ccb07e0e7b1ec5559d8db9e0e2dc51883" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/conditionable/zipball/5b40f51ccb07e0e7b1ec5559d8db9e0e2dc51883", - "reference": "5b40f51ccb07e0e7b1ec5559d8db9e0e2dc51883", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Conditionable package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-07-29T19:44:19+00:00" - }, - { - "name": "illuminate/config", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/config.git", - "reference": "92baa45cede73bc2ad8a0a193f9cb3f8bde676a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/92baa45cede73bc2ad8a0a193f9cb3f8bde676a9", - "reference": "92baa45cede73bc2ad8a0a193f9cb3f8bde676a9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Config package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-08-08T17:13:46+00:00" - }, - { - "name": "illuminate/console", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/console.git", - "reference": "b66b181219c9cc5c9a3eb777e15ffdc5d274ecc5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/b66b181219c9cc5c9a3eb777e15ffdc5d274ecc5", - "reference": "b66b181219c9cc5c9a3eb777e15ffdc5d274ecc5", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "illuminate/view": "^9.0", - "nunomaduro/termwind": "^1.13", - "php": "^8.0.2", - "symfony/console": "^6.0", - "symfony/process": "^6.0" - }, - "suggest": { - "dragonmantank/cron-expression": "Required to use scheduler (^3.1).", - "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^7.2).", - "illuminate/bus": "Required to use the scheduled job dispatcher (^9.0).", - "illuminate/container": "Required to use the scheduler (^9.0).", - "illuminate/filesystem": "Required to use the generator command (^9.0).", - "illuminate/queue": "Required to use closures for scheduled jobs (^9.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Console package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-26T14:15:21+00:00" - }, - { - "name": "illuminate/container", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "8ca3036459e26dc7cdedaf0f882b625757cc341e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/8ca3036459e26dc7cdedaf0f882b625757cc341e", - "reference": "8ca3036459e26dc7cdedaf0f882b625757cc341e", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/contracts": "^9.0", - "php": "^8.0.2", - "psr/container": "^1.1.1|^2.0.1" - }, - "provide": { - "psr/container-implementation": "1.1|2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Container\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Container package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-05T15:58:42+00:00" - }, - { - "name": "illuminate/contracts", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "d57130115694b4f6a98d064bea31cdb09d7784f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/d57130115694b4f6a98d064bea31cdb09d7784f8", - "reference": "d57130115694b4f6a98d064bea31cdb09d7784f8", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^8.0.2", - "psr/container": "^1.1.1|^2.0.1", - "psr/simple-cache": "^1.0|^2.0|^3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-15T13:31:42+00:00" - }, - { - "name": "illuminate/database", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/database.git", - "reference": "d6880620eecac4c0e1882c59889e58191232967c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/d6880620eecac4c0e1882c59889e58191232967c", - "reference": "d6880620eecac4c0e1882c59889e58191232967c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2", - "symfony/console": "^6.0" - }, - "suggest": { - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", - "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "illuminate/console": "Required to use the database commands (^9.0).", - "illuminate/events": "Required to use the observers with Eloquent (^9.0).", - "illuminate/filesystem": "Required to use the migrations (^9.0).", - "illuminate/pagination": "Required to paginate the result set (^9.0).", - "symfony/finder": "Required to use Eloquent model factories (^6.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Database\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Database package.", - "homepage": "https://laravel.com", - "keywords": [ - "database", - "laravel", - "orm", - "sql" - ], - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-10-03T15:39:23+00:00" - }, - { - "name": "illuminate/encryption", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/encryption.git", - "reference": "486b9abe76ea6f465e8610afb5c836812c7d1cef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/encryption/zipball/486b9abe76ea6f465e8610afb5c836812c7d1cef", - "reference": "486b9abe76ea6f465e8610afb5c836812c7d1cef", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "illuminate/contracts": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Encryption\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Encryption package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-05-12T20:47:59+00:00" - }, - { - "name": "illuminate/events", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/events.git", - "reference": "8e534676bac23bc17925f5c74c128f9c09b98f69" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/8e534676bac23bc17925f5c74c128f9c09b98f69", - "reference": "8e534676bac23bc17925f5c74c128f9c09b98f69", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/bus": "^9.0", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Illuminate\\Events\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Events package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-15T13:14:12+00:00" - }, - { - "name": "illuminate/filesystem", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "9abf154ca06a6034487a0e8928e5a6b2cfea2763" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/9abf154ca06a6034487a0e8928e5a6b2cfea2763", - "reference": "9abf154ca06a6034487a0e8928e5a6b2cfea2763", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2", - "symfony/finder": "^6.0" - }, - "suggest": { - "ext-ftp": "Required to use the Flysystem FTP driver.", - "illuminate/http": "Required for handling uploaded files (^7.0).", - "league/flysystem": "Required to use the Flysystem local driver (^3.0.16).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", - "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", - "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", - "symfony/mime": "Required to enable support for guessing extensions (^6.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Filesystem package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-27T19:54:00+00:00" - }, - { - "name": "illuminate/hashing", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/hashing.git", - "reference": "9c67e4a7af74c1d93b7102accd5491969ad2bd86" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/hashing/zipball/9c67e4a7af74c1d93b7102accd5491969ad2bd86", - "reference": "9c67e4a7af74c1d93b7102accd5491969ad2bd86", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/contracts": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Hashing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Hashing package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-01T14:44:21+00:00" - }, - { - "name": "illuminate/http", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/http.git", - "reference": "296a3c8c6f772d6e714fde302925c91304a316bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/296a3c8c6f772d6e714fde302925c91304a316bc", - "reference": "296a3c8c6f772d6e714fde302925c91304a316bc", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "fruitcake/php-cors": "^1.2", - "illuminate/collections": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/session": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2", - "symfony/http-foundation": "^6.0", - "symfony/http-kernel": "^6.0", - "symfony/mime": "^6.0" - }, - "suggest": { - "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", - "guzzlehttp/guzzle": "Required to use the HTTP Client (^7.2)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Http\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Http package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-29T14:02:36+00:00" - }, - { - "name": "illuminate/log", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/log.git", - "reference": "00921e471f4135a48d51d7f4ae7744b448b2a79d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/log/zipball/00921e471f4135a48d51d7f4ae7744b448b2a79d", - "reference": "00921e471f4135a48d51d7f4ae7744b448b2a79d", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/contracts": "^9.0", - "illuminate/support": "^9.0", - "monolog/monolog": "^2.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Log package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-09T18:30:36+00:00" - }, - { - "name": "illuminate/macroable", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/macroable.git", - "reference": "e3bfaf6401742a9c6abca61b9b10e998e5b6449a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/e3bfaf6401742a9c6abca61b9b10e998e5b6449a", - "reference": "e3bfaf6401742a9c6abca61b9b10e998e5b6449a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Macroable package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-08-09T13:29:29+00:00" - }, - { - "name": "illuminate/mail", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/mail.git", - "reference": "de6b2b493654c33b5336d35755973911bcfa14b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/mail/zipball/de6b2b493654c33b5336d35755973911bcfa14b7", - "reference": "de6b2b493654c33b5336d35755973911bcfa14b7", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "league/commonmark": "^2.2", - "php": "^8.0.2", - "psr/log": "^1.0|^2.0|^3.0", - "symfony/mailer": "^6.0", - "tijsverkoyen/css-to-inline-styles": "^2.2.2" - }, - "suggest": { - "aws/aws-sdk-php": "Required to use the SES mail driver (^3.198.1).", - "symfony/http-client": "Required to use the Symfony API mail transports (^6.0).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Mail\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Mail package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-14T13:13:44+00:00" - }, - { - "name": "illuminate/notifications", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/notifications.git", - "reference": "98d1e4e7966d267a3b59198a537eea05b074e028" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/notifications/zipball/98d1e4e7966d267a3b59198a537eea05b074e028", - "reference": "98d1e4e7966d267a3b59198a537eea05b074e028", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/broadcasting": "^9.0", - "illuminate/bus": "^9.0", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/filesystem": "^9.0", - "illuminate/mail": "^9.0", - "illuminate/queue": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "suggest": { - "illuminate/database": "Required to use the database transport (^9.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Notifications package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-12T13:48:14+00:00" - }, - { - "name": "illuminate/pagination", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pagination.git", - "reference": "511d24b9a109b42c61ef9b7334b5e968f6458550" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pagination/zipball/511d24b9a109b42c61ef9b7334b5e968f6458550", - "reference": "511d24b9a109b42c61ef9b7334b5e968f6458550", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Pagination\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Pagination package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-07-20T15:51:27+00:00" - }, - { - "name": "illuminate/pipeline", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pipeline.git", - "reference": "e0be3f3f79f8235ad7334919ca4094d5074e02f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pipeline/zipball/e0be3f3f79f8235ad7334919ca4094d5074e02f6", - "reference": "e0be3f3f79f8235ad7334919ca4094d5074e02f6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/contracts": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Pipeline\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Pipeline package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-06-09T14:13:53+00:00" - }, - { - "name": "illuminate/queue", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/queue.git", - "reference": "21c6c7daad18396b14864e47851241e99f1318c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/queue/zipball/21c6c7daad18396b14864e47851241e99f1318c1", - "reference": "21c6c7daad18396b14864e47851241e99f1318c1", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/console": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/database": "^9.0", - "illuminate/filesystem": "^9.0", - "illuminate/pipeline": "^9.0", - "illuminate/support": "^9.0", - "laravel/serializable-closure": "^1.0", - "php": "^8.0.2", - "ramsey/uuid": "^4.2.2", - "symfony/process": "^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver and DynamoDb failed job storage (^3.198.1).", - "ext-pcntl": "Required to use all features of the queue worker.", - "ext-posix": "Required to use all features of the queue worker.", - "illuminate/redis": "Required to use the Redis queue driver (^9.0).", - "pda/pheanstalk": "Required to use the Beanstalk queue driver (^4.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Queue\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Queue package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-28T20:24:08+00:00" - }, - { - "name": "illuminate/redis", - "version": "v9.34.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/redis.git", - "reference": "49ed2a9853c1a4ec1bd0505a14f01bf7547a45ee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/redis/zipball/49ed2a9853c1a4ec1bd0505a14f01bf7547a45ee", - "reference": "49ed2a9853c1a4ec1bd0505a14f01bf7547a45ee", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "suggest": { - "ext-redis": "Required to use the phpredis connector (^4.0|^5.0).", - "predis/predis": "Required to use the predis connector (^1.1.9|^2.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Redis\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Redis package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-08-11T16:52:04+00:00" - }, - { - "name": "illuminate/session", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/session.git", - "reference": "f62b89cee04d93852365d606040790ce90701fdf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/f62b89cee04d93852365d606040790ce90701fdf", - "reference": "f62b89cee04d93852365d606040790ce90701fdf", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/filesystem": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2", - "symfony/finder": "^6.0", - "symfony/http-foundation": "^6.0" - }, - "suggest": { - "illuminate/console": "Required to use the session:table command (^9.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Session\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Session package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-29T14:02:36+00:00" - }, - { - "name": "illuminate/support", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "9c46abb8707ba30bd60142d8fd2e2f86e3d1f016" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/9c46abb8707ba30bd60142d8fd2e2f86e3d1f016", - "reference": "9c46abb8707ba30bd60142d8fd2e2f86e3d1f016", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "doctrine/inflector": "^2.0", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/collections": "^9.0", - "illuminate/conditionable": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "nesbot/carbon": "^2.62.1", - "php": "^8.0.2", - "voku/portable-ascii": "^2.0" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (^9.0).", - "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^2.0.2).", - "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", - "symfony/process": "Required to use the composer class (^6.0).", - "symfony/uid": "Required to use Str::ulid() (^6.0).", - "symfony/var-dumper": "Required to use the dd function (^6.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-30T06:19:24+00:00" - }, - { - "name": "illuminate/testing", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/testing.git", - "reference": "ecbebd4f9cd037c98a6df20e3884f09b68719bd9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/testing/zipball/ecbebd4f9cd037c98a6df20e3884f09b68719bd9", - "reference": "ecbebd4f9cd037c98a6df20e3884f09b68719bd9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "suggest": { - "brianium/paratest": "Required to run tests in parallel (^6.0).", - "illuminate/console": "Required to assert console commands (^9.0).", - "illuminate/database": "Required to assert databases (^9.0).", - "illuminate/http": "Required to assert responses (^9.0).", - "mockery/mockery": "Required to use mocking (^1.4.4).", - "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Testing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Testing package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-15T19:03:01+00:00" - }, - { - "name": "illuminate/translation", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/translation.git", - "reference": "7a07a9d917f94b9a5bced15a24e1e995c5e923db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/translation/zipball/7a07a9d917f94b9a5bced15a24e1e995c5e923db", - "reference": "7a07a9d917f94b9a5bced15a24e1e995c5e923db", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/filesystem": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Translation package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-06-20T16:28:18+00:00" - }, - { - "name": "illuminate/validation", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/validation.git", - "reference": "472c73fbf991f09d05e84d4a710adf6791d3c7cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/472c73fbf991f09d05e84d4a710adf6791d3c7cf", - "reference": "472c73fbf991f09d05e84d4a710adf6791d3c7cf", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "egulias/email-validator": "^3.1", - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "illuminate/translation": "^9.0", - "php": "^8.0.2", - "symfony/http-foundation": "^6.0", - "symfony/mime": "^6.0" - }, - "suggest": { - "ext-bcmath": "Required to use the multiple_of validation rule.", - "illuminate/database": "Required to use the database presence verifier (^9.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Validation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Validation package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-29T14:02:36+00:00" - }, - { - "name": "illuminate/view", - "version": "v9.33.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/view.git", - "reference": "dc036c550b6e165ac07b6c8039d946461c9766c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/dc036c550b6e165ac07b6c8039d946461c9766c2", - "reference": "dc036c550b6e165ac07b6c8039d946461c9766c2", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/events": "^9.0", - "illuminate/filesystem": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\View\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate View package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-09-21T15:39:13+00:00" - }, { "name": "jean85/pretty-package-versions", "version": "2.0.5", @@ -4191,17 +1618,17 @@ "time": "2022-06-29T19:04:13+00:00" }, { - "name": "laravel/lumen-framework", - "version": "v9.1.1", + "name": "laravel/framework", + "version": "v9.33.0", "source": { "type": "git", - "url": "https://github.com/laravel/lumen-framework.git", - "reference": "9047399d331281c9efdf86e7347f6bcca4f1e60a" + "url": "https://github.com/laravel/framework.git", + "reference": "13665b7e15dbcbecb3651acc19ba8818da6fa0a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/9047399d331281c9efdf86e7347f6bcca4f1e60a", - "reference": "9047399d331281c9efdf86e7347f6bcca4f1e60a", + "url": "https://api.github.com/repos/laravel/framework/zipball/13665b7e15dbcbecb3651acc19ba8818da6fa0a9", + "reference": "13665b7e15dbcbecb3651acc19ba8818da6fa0a9", "shasum": "", "mirrors": [ { @@ -4211,49 +1638,131 @@ ] }, "require": { + "doctrine/inflector": "^2.0", "dragonmantank/cron-expression": "^3.1", - "illuminate/auth": "^9.21", - "illuminate/broadcasting": "^9.21", - "illuminate/bus": "^9.21", - "illuminate/cache": "^9.21", - "illuminate/collections": "^9.21", - "illuminate/config": "^9.21", - "illuminate/console": "^9.21", - "illuminate/container": "^9.21", - "illuminate/contracts": "^9.21", - "illuminate/database": "^9.21", - "illuminate/encryption": "^9.21", - "illuminate/events": "^9.21", - "illuminate/filesystem": "^9.21", - "illuminate/hashing": "^9.21", - "illuminate/http": "^9.21", - "illuminate/log": "^9.21", - "illuminate/macroable": "^9.21", - "illuminate/pagination": "^9.21", - "illuminate/pipeline": "^9.21", - "illuminate/queue": "^9.21", - "illuminate/support": "^9.21", - "illuminate/testing": "^9.21", - "illuminate/translation": "^9.21", - "illuminate/validation": "^9.21", - "illuminate/view": "^9.21", - "nikic/fast-route": "^1.3", + "egulias/email-validator": "^3.1", + "ext-mbstring": "*", + "ext-openssl": "*", + "fruitcake/php-cors": "^1.2", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^2.2", + "league/flysystem": "^3.0.16", + "monolog/monolog": "^2.0", + "nesbot/carbon": "^2.62.1", + "nunomaduro/termwind": "^1.13", "php": "^8.0.2", - "symfony/console": "^6.0", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.2.2", + "symfony/console": "^6.0.3", "symfony/error-handler": "^6.0", + "symfony/finder": "^6.0", "symfony/http-foundation": "^6.0", "symfony/http-kernel": "^6.0", + "symfony/mailer": "^6.0", "symfony/mime": "^6.0", + "symfony/process": "^6.0", + "symfony/routing": "^6.0", + "symfony/uid": "^6.0", "symfony/var-dumper": "^6.0", - "vlucas/phpdotenv": "^5.4.1" + "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^2.0" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/collections": "self.version", + "illuminate/conditionable": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/macroable": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/testing": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version" }, "require-dev": { + "ably/ably-php": "^1.0", + "aws/aws-sdk-php": "^3.198.1", + "doctrine/dbal": "^2.13.3|^3.1.4", + "fakerphp/faker": "^1.9.2", + "guzzlehttp/guzzle": "^7.2", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-ftp": "^3.0", + "league/flysystem-path-prefixing": "^3.3", + "league/flysystem-read-only": "^3.3", + "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.4.4", - "phpunit/phpunit": "^9.5.8" + "orchestra/testbench-core": "^7.8", + "pda/pheanstalk": "^4.0", + "phpstan/phpstan": "^1.4.7", + "phpunit/phpunit": "^9.5.8", + "predis/predis": "^1.1.9|^2.0", + "symfony/cache": "^6.0" }, "suggest": { - "laravel/tinker": "Required to use the tinker console command (^2.7).", + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.198.1).", + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", + "ext-bcmath": "Required to use the multiple_of validation rule.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", + "ext-pcntl": "Required to use all features of the queue worker.", + "ext-posix": "Required to use all features of the queue worker.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.2).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", + "league/flysystem-read-only": "Required to use read-only disks (^3.3)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9|^2.0).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^6.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." }, "type": "library", @@ -4264,10 +1773,18 @@ }, "autoload": { "files": [ - "src/helpers.php" + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" ], "psr-4": { - "Laravel\\Lumen\\": "src/" + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -4280,18 +1797,88 @@ "email": "taylor@laravel.com" } ], - "description": "The Laravel Lumen Framework.", - "homepage": "https://lumen.laravel.com", + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", "keywords": [ "framework", - "laravel", - "lumen" + "laravel" ], "support": { - "issues": "https://github.com/laravel/lumen-framework/issues", - "source": "https://github.com/laravel/lumen-framework" + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" }, - "time": "2022-09-13T15:03:52+00:00" + "time": "2022-09-30T12:59:55+00:00" + }, + { + "name": "laravel/sanctum", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "b71e80a3a8e8029e2ec8c1aa814b999609ce16dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/b71e80a3a8e8029e2ec8c1aa814b999609ce16dc", + "reference": "b71e80a3a8e8029e2ec8c1aa814b999609ce16dc", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "illuminate/console": "^9.21", + "illuminate/contracts": "^9.21", + "illuminate/database": "^9.21", + "illuminate/support": "^9.21", + "php": "^8.0.2" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^7.0", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2022-07-29T21:33:30+00:00" }, { "name": "laravel/serializable-closure", @@ -4360,17 +1947,91 @@ "time": "2022-09-08T13:45:54+00:00" }, { - "name": "league/commonmark", - "version": "2.3.6", + "name": "laravel/tinker", + "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/thephpleague/commonmark.git", - "reference": "857afc47ce113454bd629037213378ba3219dd40" + "url": "https://github.com/laravel/tinker.git", + "reference": "dff39b661e827dae6e092412f976658df82dbac5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/857afc47ce113454bd629037213378ba3219dd40", - "reference": "857afc47ce113454bd629037213378ba3219dd40", + "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", + "reference": "dff39b661e827dae6e092412f976658df82dbac5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.10.4|^0.11.1", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpunit/phpunit": "^8.5.8|^9.3.3" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.7.2" + }, + "time": "2022-03-23T12:38:24+00:00" + }, + { + "name": "league/commonmark", + "version": "2.3.7", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "a36bd2be4f5387c0f3a8792a0d76b7d68865abbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/a36bd2be4f5387c0f3a8792a0d76b7d68865abbf", + "reference": "a36bd2be4f5387c0f3a8792a0d76b7d68865abbf", "shasum": "", "mirrors": [ { @@ -4469,7 +2130,7 @@ "type": "tidelift" } ], - "time": "2022-10-30T16:45:38+00:00" + "time": "2022-11-03T17:29:46+00:00" }, { "name": "league/config", @@ -4718,68 +2379,6 @@ ], "time": "2022-04-17T13:12:02+00:00" }, - { - "name": "mmghv/lumen-route-binding", - "version": "1.5.3", - "source": { - "type": "git", - "url": "https://github.com/mmghv/lumen-route-binding.git", - "reference": "4bd5545c1f508fcd92e889b5f694c6af27b1dca2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mmghv/lumen-route-binding/zipball/4bd5545c1f508fcd92e889b5f694c6af27b1dca2", - "reference": "4bd5545c1f508fcd92e889b5f694c6af27b1dca2", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "laravel/lumen-framework": "5 - 9", - "nikic/fast-route": ">=0.4 <2.0", - "php": "~7.1|~8.0" - }, - "require-dev": { - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~7.2.0|~8.0|~9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "mmghv\\LumenRouteBinding\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mohamed Gharib", - "email": "mmghv@coddest.com" - } - ], - "description": "Route model binding for Lumen", - "homepage": "https://github.com/mmghv/lumen-route-binding", - "keywords": [ - "bind", - "binding", - "fast-route", - "lumen", - "model", - "route", - "route model binding" - ], - "support": { - "issues": "https://github.com/mmghv/lumen-route-binding/issues", - "source": "https://github.com/mmghv/lumen-route-binding/tree/1.5.3" - }, - "time": "2022-03-06T15:12:15+00:00" - }, { "name": "mongodb/mongodb", "version": "1.13.0", @@ -5230,62 +2829,6 @@ }, "time": "2022-09-06T00:55:00+00:00" }, - { - "name": "nikic/fast-route", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "FastRoute\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ], - "support": { - "issues": "https://github.com/nikic/FastRoute/issues", - "source": "https://github.com/nikic/FastRoute/tree/master" - }, - "time": "2018-02-13T20:26:39+00:00" - }, { "name": "nikic/php-parser", "version": "v4.15.1", @@ -5440,443 +2983,6 @@ ], "time": "2022-10-28T22:51:32+00:00" }, - { - "name": "nyholm/psr7", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/Nyholm/psr7.git", - "reference": "f734364e38a876a23be4d906a2a089e1315be18a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a", - "reference": "f734364e38a876a23be4d906a2a089e1315be18a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.1", - "php-http/message-factory": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "http-interop/http-factory-tests": "^0.9", - "php-http/psr7-integration-tests": "^1.0", - "phpunit/phpunit": "^7.5 || 8.5 || 9.4", - "symfony/error-handler": "^4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "Nyholm\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com" - }, - { - "name": "Martijn van der Ven", - "email": "martijn@vanderven.se" - } - ], - "description": "A fast PHP7 implementation of PSR-7", - "homepage": "https://tnyholm.se", - "keywords": [ - "psr-17", - "psr-7" - ], - "support": { - "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.5.1" - }, - "funding": [ - { - "url": "https://github.com/Zegnat", - "type": "github" - }, - { - "url": "https://github.com/nyholm", - "type": "github" - } - ], - "time": "2022-06-22T07:13:36+00:00" - }, - { - "name": "nyholm/psr7-server", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/Nyholm/psr7-server.git", - "reference": "b846a689844cef114e8079d8c80f0afd96745ae3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/b846a689844cef114e8079d8c80f0afd96745ae3", - "reference": "b846a689844cef114e8079d8c80f0afd96745ae3", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.1 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "nyholm/nsa": "^1.1", - "nyholm/psr7": "^1.3", - "phpunit/phpunit": "^7.0 || ^8.5 || ^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Nyholm\\Psr7Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com" - }, - { - "name": "Martijn van der Ven", - "email": "martijn@vanderven.se" - } - ], - "description": "Helper classes to handle PSR-7 server requests", - "homepage": "http://tnyholm.se", - "keywords": [ - "psr-17", - "psr-7" - ], - "support": { - "issues": "https://github.com/Nyholm/psr7-server/issues", - "source": "https://github.com/Nyholm/psr7-server/tree/1.0.2" - }, - "funding": [ - { - "url": "https://github.com/Zegnat", - "type": "github" - }, - { - "url": "https://github.com/nyholm", - "type": "github" - } - ], - "time": "2021-05-12T11:11:27+00:00" - }, - { - "name": "overtrue/socialite", - "version": "4.5.0", - "source": { - "type": "git", - "url": "https://github.com/overtrue/socialite.git", - "reference": "7bbaabf4c29df3c71814f2cb3d2c2e8ab54515a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/overtrue/socialite/zipball/7bbaabf4c29df3c71814f2cb3d2c2e8ab54515a1", - "reference": "7bbaabf4c29df3c71814f2cb3d2c2e8ab54515a1", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "ext-openssl": "*", - "guzzlehttp/guzzle": "^7.0", - "php": ">=8.0.2", - "symfony/http-foundation": "^6.0", - "symfony/psr-http-message-bridge": "^2.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", - "jetbrains/phpstorm-attributes": "^1.0", - "mockery/mockery": "^1.3", - "phpstan/phpstan": "^1.7", - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Overtrue\\Socialite\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "overtrue", - "email": "anzhengchao@gmail.com" - } - ], - "description": "A collection of OAuth 2 packages.", - "keywords": [ - "Feishu", - "login", - "oauth", - "qcloud", - "qq", - "social", - "wechat", - "weibo" - ], - "support": { - "issues": "https://github.com/overtrue/socialite/issues", - "source": "https://github.com/overtrue/socialite/tree/4.5.0" - }, - "funding": [ - { - "url": "https://github.com/overtrue", - "type": "github" - } - ], - "time": "2022-07-08T14:28:06+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.100", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">= 7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "time": "2020-10-15T08:29:30+00:00" - }, - { - "name": "paragonie/sodium_compat", - "version": "v1.19.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/sodium_compat.git", - "reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/cb15e403ecbe6a6cc515f855c310eb6b1872a933", - "reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "paragonie/random_compat": ">=1", - "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8" - }, - "require-dev": { - "phpunit/phpunit": "^3|^4|^5|^6|^7|^8|^9" - }, - "suggest": { - "ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.", - "ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security." - }, - "type": "library", - "autoload": { - "files": [ - "autoload.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com" - }, - { - "name": "Frank Denis", - "email": "jedisct1@pureftpd.org" - } - ], - "description": "Pure PHP implementation of libsodium; uses the PHP extension if it exists", - "keywords": [ - "Authentication", - "BLAKE2b", - "ChaCha20", - "ChaCha20-Poly1305", - "Chapoly", - "Curve25519", - "Ed25519", - "EdDSA", - "Edwards-curve Digital Signature Algorithm", - "Elliptic Curve Diffie-Hellman", - "Poly1305", - "Pure-PHP cryptography", - "RFC 7748", - "RFC 8032", - "Salpoly", - "Salsa20", - "X25519", - "XChaCha20-Poly1305", - "XSalsa20-Poly1305", - "Xchacha20", - "Xsalsa20", - "aead", - "cryptography", - "ecdh", - "elliptic curve", - "elliptic curve cryptography", - "encryption", - "libsodium", - "php", - "public-key cryptography", - "secret-key cryptography", - "side-channel resistant" - ], - "support": { - "issues": "https://github.com/paragonie/sodium_compat/issues", - "source": "https://github.com/paragonie/sodium_compat/tree/v1.19.0" - }, - "time": "2022-09-26T03:40:35+00:00" - }, - { - "name": "php-http/message-factory", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Factory interfaces for PSR-7 HTTP Message", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "stream", - "uri" - ], - "support": { - "issues": "https://github.com/php-http/message-factory/issues", - "source": "https://github.com/php-http/message-factory/tree/master" - }, - "time": "2015-12-19T14:08:53+00:00" - }, { "name": "phpoption/phpoption", "version": "1.8.1", @@ -5954,83 +3060,6 @@ ], "time": "2021-12-04T23:24:31+00:00" }, - { - "name": "predis/predis", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/predis/predis.git", - "reference": "7683215023a6669d618c56df7c025ab8e6840bfd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/7683215023a6669d618c56df7c025ab8e6840bfd", - "reference": "7683215023a6669d618c56df7c025ab8e6840bfd", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.0 || ~9.4.4" - }, - "suggest": { - "ext-curl": "Allows access to Webdis when paired with phpiredis", - "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Predis\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniele Alessandri", - "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net", - "role": "Creator & Maintainer" - }, - { - "name": "Till Krüss", - "homepage": "https://till.im", - "role": "Maintainer" - } - ], - "description": "A flexible and feature-complete Redis client for PHP.", - "homepage": "http://github.com/predis/predis", - "keywords": [ - "nosql", - "predis", - "redis" - ], - "support": { - "issues": "https://github.com/predis/predis/issues", - "source": "https://github.com/predis/predis/tree/v2.0.1" - }, - "funding": [ - { - "url": "https://github.com/sponsors/tillkruss", - "type": "github" - } - ], - "time": "2022-09-04T21:57:36+00:00" - }, { "name": "psr/cache", "version": "3.0.0", @@ -6574,146 +3603,6 @@ }, "time": "2022-07-28T14:25:11+00:00" }, - { - "name": "pusher/pusher-php-server", - "version": "7.2.0", - "source": { - "type": "git", - "url": "https://github.com/pusher/pusher-http-php.git", - "reference": "7ed4a62956c7426814c7dc67b2bb764cd0e1a603" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pusher/pusher-http-php/zipball/7ed4a62956c7426814c7dc67b2bb764cd0e1a603", - "reference": "7ed4a62956c7426814c7dc67b2bb764cd0e1a603", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "guzzlehttp/guzzle": "^7.2", - "paragonie/sodium_compat": "^1.6", - "php": "^7.3|^8.0", - "psr/log": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "overtrue/phplint": "^2.3", - "phpunit/phpunit": "^8.5|^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Pusher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Library for interacting with the Pusher REST API", - "keywords": [ - "events", - "messaging", - "php-pusher-server", - "publish", - "push", - "pusher", - "real time", - "real-time", - "realtime", - "rest", - "trigger" - ], - "support": { - "issues": "https://github.com/pusher/pusher-http-php/issues", - "source": "https://github.com/pusher/pusher-http-php/tree/7.2.0" - }, - "time": "2022-10-03T14:28:42+00:00" - }, - { - "name": "qcloud/cos-sdk-v5", - "version": "v2.5.6", - "source": { - "type": "git", - "url": "https://github.com/tencentyun/cos-php-sdk-v5.git", - "reference": "607ee49d372a799964206b6ae0a9eb2816201c42" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/607ee49d372a799964206b6ae0a9eb2816201c42", - "reference": "607ee49d372a799964206b6ae0a9eb2816201c42", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.2.1 || ^7.0", - "guzzlehttp/guzzle-services": "^1.1", - "guzzlehttp/psr7": "^1.3.1 || ^2.0", - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "files": [ - "src/Common.php" - ], - "psr-4": { - "Qcloud\\Cos\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "yaozongyou", - "email": "yaozongyou@vip.qq.com" - }, - { - "name": "lewzylu", - "email": "327874225@qq.com" - }, - { - "name": "tuunalai", - "email": "550566181@qq.com" - } - ], - "description": "PHP SDK for QCloud COS", - "keywords": [ - "cos", - "php", - "qcloud" - ], - "support": { - "issues": "https://github.com/tencentyun/cos-php-sdk-v5/issues", - "source": "https://github.com/tencentyun/cos-php-sdk-v5/tree/v2.5.6" - }, - "time": "2022-06-07T14:49:19+00:00" - }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -6949,241 +3838,6 @@ ], "time": "2022-09-16T03:22:46+00:00" }, - { - "name": "swoole/ide-helper", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/swoole/ide-helper.git", - "reference": "939352ede9e8cddce96897d18b4fbd0c1e2110a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swoole/ide-helper/zipball/939352ede9e8cddce96897d18b4fbd0c1e2110a3", - "reference": "939352ede9e8cddce96897d18b4fbd0c1e2110a3", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Team Swoole", - "email": "team@swoole.com" - } - ], - "description": "IDE help files for Swoole.", - "support": { - "issues": "https://github.com/swoole/ide-helper/issues", - "source": "https://github.com/swoole/ide-helper/tree/5.0.0" - }, - "funding": [ - { - "url": "https://gitee.com/swoole/swoole?donate=true", - "type": "custom" - }, - { - "url": "https://github.com/swoole", - "type": "github" - } - ], - "time": "2022-08-10T05:32:06+00:00" - }, - { - "name": "symfony/cache", - "version": "v6.1.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "ee5d5b88162684a1377706f9c25125e97685ee61" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/ee5d5b88162684a1377706f9c25125e97685ee61", - "reference": "ee5d5b88162684a1377706f9c25125e97685ee61", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=8.1", - "psr/cache": "^2.0|^3.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2|^3", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/var-exporter": "^5.4|^6.0" - }, - "conflict": { - "doctrine/dbal": "<2.13.1", - "symfony/dependency-injection": "<5.4", - "symfony/http-kernel": "<5.4", - "symfony/var-dumper": "<5.4" - }, - "provide": { - "psr/cache-implementation": "2.0|3.0", - "psr/simple-cache-implementation": "1.0|2.0|3.0", - "symfony/cache-implementation": "1.1|2.0|3.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/dbal": "^2.13.1|^3.0", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/filesystem": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "classmap": [ - "Traits/ValueWrapper.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "support": { - "source": "https://github.com/symfony/cache/tree/v6.1.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-28T16:23:08+00:00" - }, - { - "name": "symfony/cache-contracts", - "version": "v3.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "2eab7fa459af6d75c6463e63e633b667a9b761d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/2eab7fa459af6d75c6463e63e633b667a9b761d3", - "reference": "2eab7fa459af6d75c6463e63e633b667a9b761d3", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=8.1", - "psr/cache": "^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.1.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-25T11:15:52+00:00" - }, { "name": "symfony/console", "version": "v6.1.7", @@ -7751,183 +4405,6 @@ ], "time": "2022-04-15T08:08:08+00:00" }, - { - "name": "symfony/http-client", - "version": "v6.1.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "f515d066728774efb34347a87580621416ca8968" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/f515d066728774efb34347a87580621416ca8968", - "reference": "f515d066728774efb34347a87580621416ca8968", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=8.1", - "psr/log": "^1|^2|^3", - "symfony/http-client-contracts": "^3", - "symfony/service-contracts": "^1.0|^2|^3" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "3.0" - }, - "require-dev": { - "amphp/amp": "^2.5", - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/stopwatch": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-client/tree/v6.1.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-28T16:23:08+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v3.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/fd038f08c623ab5d22b26e9ba35afe8c79071800", - "reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=8.1" - }, - "suggest": { - "symfony/http-client-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.1.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-04-22T07:30:54+00:00" - }, { "name": "symfony/http-foundation", "version": "v6.1.7", @@ -8996,6 +5473,94 @@ ], "time": "2022-05-24T11:49:31+00:00" }, + { + "name": "symfony/polyfill-uuid", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-uuid.git", + "reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/a41886c1c81dc075a09c71fe6db5b9d68c79de23", + "reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-uuid": "*" + }, + "suggest": { + "ext-uuid": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Uuid\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for uuid functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, { "name": "symfony/process", "version": "v6.1.3", @@ -9157,6 +5722,100 @@ ], "time": "2021-11-05T13:13:39+00:00" }, + { + "name": "symfony/routing", + "version": "v6.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "95effeb9d6e2cec861cee06bf5bbf82d09aea7f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/95effeb9d6e2cec861cee06bf5bbf82d09aea7f5", + "reference": "95effeb9d6e2cec861cee06bf5bbf82d09aea7f5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=8.1" + }, + "conflict": { + "doctrine/annotations": "<1.12", + "symfony/config": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.12", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v6.1.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-10-18T13:12:43+00:00" + }, { "name": "symfony/service-contracts", "version": "v3.1.0", @@ -9528,6 +6187,86 @@ ], "time": "2022-06-27T17:24:16+00:00" }, + { + "name": "symfony/uid", + "version": "v6.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/uid.git", + "reference": "e03519f7b1ce1d3c0b74f751892bb41d549a2d98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/uid/zipball/e03519f7b1ce1d3c0b74f751892bb41d549a2d98", + "reference": "e03519f7b1ce1d3c0b74f751892bb41d549a2d98", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-uuid": "^1.15" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Uid\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to generate and represent UIDs", + "homepage": "https://symfony.com", + "keywords": [ + "UID", + "ulid", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/uid/tree/v6.1.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-09-09T09:34:27+00:00" + }, { "name": "symfony/var-dumper", "version": "v6.1.5", @@ -9622,141 +6361,6 @@ ], "time": "2022-09-08T09:34:40+00:00" }, - { - "name": "symfony/var-exporter", - "version": "v6.1.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "b49350f45cebbba6e5286485264b912f2bcfc9ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b49350f45cebbba6e5286485264b912f2bcfc9ef", - "reference": "b49350f45cebbba6e5286485264b912f2bcfc9ef", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/var-dumper": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "serialize" - ], - "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.1.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-04T16:01:56+00:00" - }, - { - "name": "thenorthmemory/xml", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/TheNorthMemory/xml.git", - "reference": "60afcbaab8e295a62d34e068d0ae692f65971982" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/TheNorthMemory/xml/zipball/60afcbaab8e295a62d34e068d0ae692f65971982", - "reference": "60afcbaab8e295a62d34e068d0ae692f65971982", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-libxml": "*", - "ext-simplexml": "*", - "php": ">=7.1.2" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.89 || ^1.0", - "phpunit/phpunit": "^7.5 || ^8.5.16 || ^9.3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "TheNorthMemory\\Xml\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "James ZHANG", - "homepage": "https://github.com/TheNorthMemory" - } - ], - "description": "A wrapper of the XML parser and builder", - "homepage": "https://github.com/TheNorthMemory/xml", - "keywords": [ - "xml-builder", - "xml-parser" - ], - "support": { - "issues": "https://github.com/TheNorthMemory/xml/issues", - "source": "https://github.com/TheNorthMemory/xml/tree/1.0.0" - }, - "time": "2022-09-25T08:09:36+00:00" - }, { "name": "tijsverkoyen/css-to-inline-styles", "version": "2.2.5", @@ -9982,112 +6586,6 @@ ], "time": "2022-03-08T17:03:00+00:00" }, - { - "name": "w7corp/easywechat", - "version": "6.8.0", - "source": { - "type": "git", - "url": "https://github.com/w7corp/easywechat.git", - "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/w7corp/easywechat/zipball/60f0b4ba2ac3144df1a2291193daa34beb949d26", - "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-curl": "*", - "ext-fileinfo": "*", - "ext-libxml": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "ext-sodium": "*", - "monolog/monolog": "^2.2", - "nyholm/psr7": "^1.5", - "nyholm/psr7-server": "^1.0", - "overtrue/socialite": "^3.5|^4.0.1", - "php": ">=8.0.2", - "psr/http-client": "^1.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "symfony/cache": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/mime": "^5.4|^6.0", - "symfony/polyfill-php81": "^1.25", - "symfony/psr-http-message-bridge": "^2.1.2", - "thenorthmemory/xml": "^1.0" - }, - "require-dev": { - "brainmaestro/composer-git-hooks": "^2.8", - "jetbrains/phpstorm-attributes": "^1.0", - "laravel/pint": "^1.2", - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.4.4", - "phpstan/phpstan": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/var-dumper": "^5.2" - }, - "type": "library", - "extra": { - "hooks": { - "pre-commit": [ - "composer check-style", - "composer phpstan", - "composer test" - ], - "pre-push": [ - "composer check-style" - ], - "config": { - "stop-on-failure": [ - "pre-commit", - "pre-push" - ] - } - } - }, - "autoload": { - "psr-4": { - "EasyWeChat\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "overtrue", - "email": "anzhengchao@gmail.com" - } - ], - "description": "微信SDK", - "keywords": [ - "easywechat", - "sdk", - "wechat", - "weixin", - "weixin-sdk" - ], - "support": { - "issues": "https://github.com/w7corp/easywechat/issues", - "source": "https://github.com/w7corp/easywechat/tree/6.8.0" - }, - "funding": [ - { - "url": "https://github.com/overtrue", - "type": "github" - } - ], - "time": "2022-09-25T13:05:18+00:00" - }, { "name": "webmozart/assert", "version": "1.11.0", @@ -10151,6 +6649,226 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "yansongda/laravel-pay", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/yansongda/laravel-pay.git", + "reference": "f0eaaa7f8f6b9740c4e954c2456e44bf9b160095" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yansongda/laravel-pay/zipball/f0eaaa7f8f6b9740c4e954c2456e44bf9b160095", + "reference": "f0eaaa7f8f6b9740c4e954c2456e44bf9b160095", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/contracts": "^8.0 || ^9.0", + "illuminate/support": "^8.0 || ^9.0", + "yansongda/pay": "~3.2.0" + }, + "require-dev": { + "laravel/framework": "^8.0 || ^9.0", + "laravel/lumen-framework": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Yansongda\\LaravelPay\\PayServiceProvider" + ], + "aliases": { + "Pay": "Yansongda\\LaravelPay\\Facades\\Pay" + } + } + }, + "autoload": { + "psr-4": { + "Yansongda\\LaravelPay\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "yansongda", + "email": "me@yansongda.cn" + } + ], + "description": "专注 Alipay/WeChat/Unipay 的 laravel 支付扩展包", + "keywords": [ + "alipay", + "laravel", + "package", + "pay", + "unipay", + "wechat" + ], + "support": { + "issues": "https://github.com/yansongda/laravel-pay/issues", + "source": "https://github.com/yansongda/laravel-pay" + }, + "time": "2022-09-24T08:31:31+00:00" + }, + { + "name": "yansongda/pay", + "version": "v3.2.9", + "source": { + "type": "git", + "url": "https://github.com/yansongda/pay.git", + "reference": "20c3ef48d71ff276a87bc6b38399d6585d1b82ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yansongda/pay/zipball/20c3ef48d71ff276a87bc6b38399d6585d1b82ce", + "reference": "20c3ef48d71ff276a87bc6b38399d6585d1b82ce", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-bcmath": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "php": ">=7.4", + "psr/container": "^1.1 | ^2.0", + "psr/event-dispatcher": "^1.0", + "psr/http-client": "^1.0", + "psr/http-message": "^1.0", + "psr/log": "^1.1 | ^2.0 | ^3.0", + "yansongda/supports": "~3.2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.0", + "guzzlehttp/guzzle": "^7.0", + "mockery/mockery": "^1.4", + "monolog/monolog": "^2.2", + "phpstan/phpstan": "^1.0.0", + "phpunit/phpunit": "^9.0", + "symfony/event-dispatcher": "^5.2.0", + "symfony/http-foundation": "^5.2.0", + "symfony/psr-http-message-bridge": "^2.1", + "symfony/var-dumper": "^5.1" + }, + "suggest": { + "hyperf/utils": "Hyperf 框架下使用 SDK,请安装", + "illuminate/container": "Laravel 框架下使用 SDK,请安装", + "php-di/php-di": "其它/无框架下使用 SDK,请安装" + }, + "type": "library", + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Yansongda\\Pay\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "yansongda", + "email": "me@yansongda.cn" + } + ], + "description": "可能是我用过的最优雅的 Alipay 和 WeChat 的支付 SDK 扩展包了", + "keywords": [ + "alipay", + "pay", + "wechat" + ], + "support": { + "homepage": "https://pay.yansongda.cn", + "issues": "https://github.com/yansongda/pay/issues", + "source": "https://github.com/yansongda/pay" + }, + "time": "2022-10-30T06:14:58+00:00" + }, + { + "name": "yansongda/supports", + "version": "v3.2.5", + "source": { + "type": "git", + "url": "https://github.com/yansongda/supports.git", + "reference": "c3f736efe169696cef94730976e604a61c345b5c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yansongda/supports/zipball/c3f736efe169696cef94730976e604a61c345b5c", + "reference": "c3f736efe169696cef94730976e604a61c345b5c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.0", + "mockery/mockery": "^1.4", + "monolog/monolog": "^2.0", + "phpstan/phpstan": "^1.1.0", + "phpunit/phpunit": "^9.0", + "symfony/console": "^5.1" + }, + "suggest": { + "monolog/monolog": "Use logger", + "symfony/console": "Use stdout logger" + }, + "type": "library", + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Yansongda\\Supports\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "yansongda", + "email": "me@yansongda.cn" + } + ], + "description": "common components", + "keywords": [ + "array", + "collection", + "config", + "support" + ], + "support": { + "issues": "https://github.com/yansongda/supports/issues", + "source": "https://github.com/yansongda/supports" + }, + "time": "2022-03-28T10:25:04+00:00" } ], "packages-dev": [ @@ -10303,6 +7021,83 @@ }, "time": "2022-02-02T17:38:57+00:00" }, + { + "name": "filp/whoops", + "version": "2.14.5", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.5" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2022-01-07T12:00:00+00:00" + }, { "name": "hamcrest/hamcrest-php", "version": "v2.0.1", @@ -10360,6 +7155,144 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "laravel/pint", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "9fb8e93074de3c04a0975beb90dcb38562afbdaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/9fb8e93074de3c04a0975beb90dcb38562afbdaa", + "reference": "9fb8e93074de3c04a0975beb90dcb38562afbdaa", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.11.0", + "illuminate/view": "^9.27", + "laravel-zero/framework": "^9.1.3", + "mockery/mockery": "^1.5.0", + "nunomaduro/larastan": "^2.2", + "nunomaduro/termwind": "^1.14.0", + "pestphp/pest": "^1.22.1" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2022-09-06T16:01:44+00:00" + }, + { + "name": "laravel/sail", + "version": "v1.16.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/sail.git", + "reference": "cd7b9b6817c871e8b85d4f42e714303ee22676da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sail/zipball/cd7b9b6817c871e8b85d4f42e714303ee22676da", + "reference": "cd7b9b6817c871e8b85d4f42e714303ee22676da", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/console": "^8.0|^9.0", + "illuminate/contracts": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^7.3|^8.0" + }, + "bin": [ + "bin/sail" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sail\\SailServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Docker files for running a basic Laravel application.", + "keywords": [ + "docker", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/sail/issues", + "source": "https://github.com/laravel/sail" + }, + "time": "2022-09-26T13:53:59+00:00" + }, { "name": "mockery/mockery", "version": "1.5.1", @@ -10503,6 +7436,100 @@ ], "time": "2022-03-03T13:19:32+00:00" }, + { + "name": "nunomaduro/collision", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "0f6349c3ed5dd28467087b08fb59384bb458a22b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/0f6349c3ed5dd28467087b08fb59384bb458a22b", + "reference": "0f6349c3ed5dd28467087b08fb59384bb458a22b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "filp/whoops": "^2.14.5", + "php": "^8.0.0", + "symfony/console": "^6.0.2" + }, + "require-dev": { + "brianium/paratest": "^6.4.1", + "laravel/framework": "^9.26.1", + "laravel/pint": "^1.1.1", + "nunomaduro/larastan": "^1.0.3", + "nunomaduro/mock-final-classes": "^1.1.0", + "orchestra/testbench": "^7.7", + "phpunit/phpunit": "^9.5.23", + "spatie/ignition": "^1.4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "6.x-dev" + }, + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2022-09-29T12:29:49+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.3", @@ -12142,6 +9169,326 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "spatie/backtrace", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/backtrace.git", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "ext-json": "*", + "phpunit/phpunit": "^9.3", + "symfony/var-dumper": "^5.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Backtrace\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van de Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A better backtrace", + "homepage": "https://github.com/spatie/backtrace", + "keywords": [ + "Backtrace", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/backtrace/issues", + "source": "https://github.com/spatie/backtrace/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spatie", + "type": "github" + }, + { + "url": "https://spatie.be/open-source/support-us", + "type": "other" + } + ], + "time": "2021-11-09T10:57:15+00:00" + }, + { + "name": "spatie/flare-client-php", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/flare-client-php.git", + "reference": "b1b974348750925b717fa8c8b97a0db0d1aa40ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/b1b974348750925b717fa8c8b97a0db0d1aa40ca", + "reference": "b1b974348750925b717fa8c8b97a0db0d1aa40ca", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/pipeline": "^8.0|^9.0", + "php": "^8.0", + "spatie/backtrace": "^1.2", + "symfony/http-foundation": "^5.0|^6.0", + "symfony/mime": "^5.2|^6.0", + "symfony/process": "^5.2|^6.0", + "symfony/var-dumper": "^5.2|^6.0" + }, + "require-dev": { + "dms/phpunit-arraysubset-asserts": "^0.3.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/phpunit-snapshot-assertions": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\FlareClient\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Send PHP errors to Flare", + "homepage": "https://github.com/spatie/flare-client-php", + "keywords": [ + "exception", + "flare", + "reporting", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/flare-client-php/issues", + "source": "https://github.com/spatie/flare-client-php/tree/1.3.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-08-08T10:10:20+00:00" + }, + { + "name": "spatie/ignition", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/ignition.git", + "reference": "997363fbcce809b1e55f571997d49017f9c623d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/ignition/zipball/997363fbcce809b1e55f571997d49017f9c623d9", + "reference": "997363fbcce809b1e55f571997d49017f9c623d9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "monolog/monolog": "^2.0", + "php": "^8.0", + "spatie/flare-client-php": "^1.1", + "symfony/console": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spatie\\Ignition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for PHP applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/ignition/issues", + "source": "https://github.com/spatie/ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-05-16T13:16:07+00:00" + }, + { + "name": "spatie/laravel-ignition", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-ignition.git", + "reference": "29deea5d9cf921590184be6956e657c4f4566440" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/29deea5d9cf921590184be6956e657c4f4566440", + "reference": "29deea5d9cf921590184be6956e657c4f4566440", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/support": "^8.77|^9.0", + "monolog/monolog": "^2.3", + "php": "^8.0", + "spatie/flare-client-php": "^1.0.1", + "spatie/ignition": "^1.2.4", + "symfony/console": "^5.0|^6.0", + "symfony/var-dumper": "^5.0|^6.0" + }, + "require-dev": { + "filp/whoops": "^2.14", + "livewire/livewire": "^2.8|dev-develop", + "mockery/mockery": "^1.4", + "nunomaduro/larastan": "^1.0", + "orchestra/testbench": "^6.23|^7.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/laravel-ray": "^1.27" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelIgnition\\IgnitionServiceProvider" + ], + "aliases": { + "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\LaravelIgnition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for Laravel applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/laravel-ignition/issues", + "source": "https://github.com/spatie/laravel-ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-09-01T11:31:14+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.1", @@ -12205,7 +9552,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.0" + "php": "^8.0.2" }, "platform-dev": [], "plugin-api-version": "2.3.0" diff --git a/config/app.php b/config/app.php index a504b5d..095c751 100644 --- a/config/app.php +++ b/config/app.php @@ -1,5 +1,7 @@ env('APP_NAME', 'LAEv3'), + 'name' => env('APP_NAME', 'LAECLOUD'), /* |-------------------------------------------------------------------------- @@ -54,6 +56,8 @@ 'url' => env('APP_URL', 'http://localhost'), + 'asset_url' => env('ASSET_URL'), + /* |-------------------------------------------------------------------------- | Application Timezone @@ -78,7 +82,7 @@ | */ - 'locale' => env('APP_LOCALE', 'en'), + 'locale' => 'en', /* |-------------------------------------------------------------------------- @@ -91,7 +95,20 @@ | */ - 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | + */ + + 'faker_locale' => 'en_US', /* |-------------------------------------------------------------------------- @@ -108,6 +125,94 @@ 'cipher' => 'AES-256-CBC', + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => 'cache', + 'store' => 'redis', + ], + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => [ + + /* + * Laravel Framework Service Providers... + */ + Illuminate\Auth\AuthServiceProvider::class, + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Database\DatabaseServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Filesystem\FilesystemServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, + + /* + * Package Service Providers... + */ + Jenssegers\Mongodb\MongodbServiceProvider::class, + + /* + * Application Service Providers... + */ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, + App\Providers\EventServiceProvider::class, + App\Providers\RouteServiceProvider::class, + + ], + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => Facade::defaultAliases()->merge([ + // 'ExampleClass' => App\Example\ExampleClass::class, + ])->toArray(), + 'instance_id' => env('INSTANCE_ID', null), 'instance_type' => env('INSTANCE_TYPE', 'primary'), diff --git a/config/auth.php b/config/auth.php index b3ca2f4..9cab7e2 100644 --- a/config/auth.php +++ b/config/auth.php @@ -14,8 +14,8 @@ */ 'defaults' => [ - // 'guard' => env('AUTH_GUARD', 'api'), - 'guard' => 'api', + 'guard' => 'web', + 'passwords' => 'users', ], /* @@ -31,22 +31,16 @@ | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | - | Supported: "token" + | Supported: "session" | */ 'guards' => [ - // 'web' => [ - // 'driver' => 'session', - // 'provider' => 'users', - // ], - - // 'admin' => [ - // 'driver' => 'token', - // 'provider' => 'admins', - // ], - - 'remote' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + 'module' => [ 'driver' => 'token', 'provider' => 'modules', ], @@ -74,21 +68,19 @@ */ 'providers' => [ - // - 'users' => [ 'driver' => 'eloquent', 'model' => App\Models\User::class, ], - 'admins' => [ - 'driver' => 'eloquent', - 'model' => App\Models\Admin\Admin::class, - ], + // 'admins' => [ + // 'driver' => 'eloquent', + // 'model' => App\Models\Admin\Admin::class, + // ], 'modules' => [ 'driver' => 'eloquent', - 'model' => App\Models\Module\Module::class, + 'model' => App\Models\Module::class, ], ], @@ -97,22 +89,36 @@ | Resetting Passwords |-------------------------------------------------------------------------- | - | Here you may set the options for resetting passwords including the view - | that is your password reset e-mail. You may also set the name of the - | table that maintains all of the reset tokens for your application. - | | You may specify multiple password reset configurations if you have more | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | - | The expire time is the number of minutes that the reset token should be + | The expire time is the number of minutes that each reset token will be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | */ 'passwords' => [ - // + 'users' => [ + 'provider' => 'users', + 'table' => 'password_resets', + 'expire' => 60, + 'throttle' => 60, + ], ], + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => 10800, + ]; diff --git a/config/broadcasting.php b/config/broadcasting.php index 2733d4e..9e4d4aa 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -11,7 +11,7 @@ | framework when an event needs to be broadcast. You may set this to | any of the connections defined in the "connections" array below. | - | Supported: "pusher", "redis", "log", "null" + | Supported: "pusher", "ably", "redis", "log", "null" | */ @@ -32,21 +32,29 @@ 'pusher' => [ 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY', 'app-key'), - 'secret' => env('PUSHER_APP_SECRET', 'app-secret'), - 'app_id' => env('PUSHER_APP_ID', 'app-id'), + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'host' => env('PUSHER_HOST', '127.0.0.1'), - 'port' => env('PUSHER_PORT', 6001), - 'scheme' => env('PUSHER_SCHEME', 'http'), + 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', + 'port' => env('PUSHER_PORT', 443), + 'scheme' => env('PUSHER_SCHEME', 'https'), 'encrypted' => true, - 'useTLS' => env('PUSHER_SCHEME') === 'https', + 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', ], + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html + ], + ], + + 'ably' => [ + 'driver' => 'ably', + 'key' => env('ABLY_KEY'), ], 'redis' => [ 'driver' => 'redis', - 'connection' => env('BROADCAST_REDIS_CONNECTION', 'default'), + 'connection' => 'default', ], 'log' => [ diff --git a/config/cache.php b/config/cache.php index 04f6278..ff3c2cd 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,7 +1,5 @@ 'redis', + 'default' => env('CACHE_DRIVER', 'file'), /* |-------------------------------------------------------------------------- @@ -28,13 +24,72 @@ | well as their drivers. You may even define multiple stores for the | same cache driver to group types of items stored in your caches. | + | Supported drivers: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb", "octane", "null" + | */ 'stores' => [ + + 'apc' => [ + 'driver' => 'apc', + ], + + 'array' => [ + 'driver' => 'array', + 'serialize' => false, + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'cache', + 'connection' => null, + 'lock_connection' => null, + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache/data'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + 'redis' => [ 'driver' => 'redis', - 'connection' => env('CACHE_REDIS_CONNECTION', 'cache'), + 'connection' => 'cache', + 'lock_connection' => 'default', ], + + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + + 'octane' => [ + 'driver' => 'octane', + ], + ], /* @@ -42,15 +97,12 @@ | Cache Key Prefix |-------------------------------------------------------------------------- | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. | */ - 'prefix' => env( - 'CACHE_PREFIX', - 'laev3_cache' - ), + 'prefix' => 'laev3_cache' ]; diff --git a/config/cors.php b/config/cors.php new file mode 100644 index 0000000..8a39e6d --- /dev/null +++ b/config/cors.php @@ -0,0 +1,34 @@ + ['api/*', 'sanctum/csrf-cookie'], + + 'allowed_methods' => ['*'], + + 'allowed_origins' => ['*'], + + 'allowed_origins_patterns' => [], + + 'allowed_headers' => ['*'], + + 'exposed_headers' => [], + + 'max_age' => 0, + + 'supports_credentials' => false, + +]; diff --git a/config/database.php b/config/database.php index 48a4020..af35775 100644 --- a/config/database.php +++ b/config/database.php @@ -36,34 +36,24 @@ 'connections' => [ 'mysql' => [ 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', 3306), + 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => env('DB_CHARSET', 'utf8mb4'), - 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), - 'prefix' => env('DB_PREFIX', ''), - 'strict' => env('DB_STRICT_MODE', true), - 'engine' => env('DB_ENGINE'), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, 'timezone' => env('DB_TIMEZONE', '+08:00'), - 'options' => [ - PDO::ATTR_PERSISTENT => true, - ], - ], + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), PDO::ATTR_PERSISTENT => true, - 'pgsql' => [ - 'driver' => 'pgsql', - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', 5432), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => env('DB_CHARSET', 'utf8'), - 'prefix' => env('DB_PREFIX', ''), - 'search_path' => env('DB_SCHEMA', 'public'), - 'sslmode' => env('DB_SSL_MODE', 'prefer'), + ]) : [], ], 'mongodb' => [ @@ -74,12 +64,24 @@ 'username' => env('MONGO_DB_USERNAME', 'homestead'), 'password' => env('MONGO_DB_PASSWORD', 'secret'), 'options' => [ - // here you can pass more settings to the Mongo Driver Manager - // see https://www.php.net/manual/en/mongodb-driver-manager.construct.php under "Uri Options" for a list of complete parameters that you can use - - 'database' => env('MONGO_DBDB_AUTHENTICATION_DATABASE', 'admin'), // required with Mongo 3+ + 'database' => env('MONGO_DB_AUTHENTICATION_DATABASE', 'admin'), ], ], + + // 'pgsql' => [ + // 'driver' => 'pgsql', + // 'url' => env('DATABASE_URL'), + // 'host' => env('DB_HOST', '127.0.0.1'), + // 'port' => env('DB_PORT', '5432'), + // 'database' => env('DB_DATABASE', 'forge'), + // 'username' => env('DB_USERNAME', 'forge'), + // 'password' => env('DB_PASSWORD', ''), + // 'charset' => 'utf8', + // 'prefix' => '', + // 'prefix_indexes' => true, + // 'search_path' => 'public', + // 'sslmode' => 'prefer', + // ], ], /* @@ -101,7 +103,7 @@ |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also - | provides a richer set of commands than a typical key-value systems + | provides a richer body of commands than a typical key-value system | such as APC or Memcached. Laravel makes it easy to dig right in. | */ @@ -112,33 +114,27 @@ 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), - // 'scheme' => 'tls', - 'prefix' => 'laecloud_database_', + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'), ], 'default' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_DB', 0), + 'database' => env('REDIS_DB', '0'), 'persistent' => true, ], 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_CACHE_DB', 1), - ], - - 'cluster_ready' => [ - 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_CACHE_DB', 2), + 'database' => env('REDIS_CACHE_DB', '1'), + 'persistent' => true, ], ], diff --git a/config/filesystems.php b/config/filesystems.php index f062345..e9d9dbd 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -15,19 +15,6 @@ 'default' => env('FILESYSTEM_DISK', 'local'), - /* - |-------------------------------------------------------------------------- - | Default Cloud Filesystem Disk - |-------------------------------------------------------------------------- - | - | Many applications store files both locally and in the cloud. For this - | reason, you may specify a default "cloud" driver here. This driver - | will be bound as the Cloud disk implementation in the container. - | - */ - - 'cloud' => env('FILESYSTEM_CLOUD', 's3'), - /* |-------------------------------------------------------------------------- | Filesystem Disks @@ -35,9 +22,9 @@ | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. + | been set up for each driver as an example of the required values. | - | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" + | Supported Drivers: "local", "ftp", "sftp", "s3" | */ @@ -46,6 +33,7 @@ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), + 'throw' => false, ], 'public' => [ @@ -53,6 +41,7 @@ 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', + 'throw' => false, ], 's3' => [ @@ -63,8 +52,25 @@ 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT'), + 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, ], ], + /* + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | + */ + + 'links' => [ + public_path('storage') => storage_path('app/public'), + ], + ]; diff --git a/config/hashing.php b/config/hashing.php new file mode 100644 index 0000000..bcd3be4 --- /dev/null +++ b/config/hashing.php @@ -0,0 +1,52 @@ + 'bcrypt', + + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 10), + ], + + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'argon' => [ + 'memory' => 65536, + 'threads' => 1, + 'time' => 4, + ], + +]; diff --git a/config/laravels.php b/config/laravels.php deleted file mode 100644 index be5efa6..0000000 --- a/config/laravels.php +++ /dev/null @@ -1,312 +0,0 @@ - env('LARAVELS_LISTEN_IP', '127.0.0.1'), - - /* - |-------------------------------------------------------------------------- - | The port of the server - |-------------------------------------------------------------------------- - | - | Require root privilege if port is less than 1024. - | - */ - - 'listen_port' => env('LARAVELS_LISTEN_PORT', 5200), - - /* - |-------------------------------------------------------------------------- - | The socket type of the server - |-------------------------------------------------------------------------- - | - | Usually, you don’t need to care about it. - | Unless you want Nginx to proxy to the UnixSocket Stream file, you need - | to modify it to SWOOLE_SOCK_UNIX_STREAM, and listen_ip is the path of UnixSocket Stream file. - | List of socket types: - | SWOOLE_SOCK_TCP: TCP - | SWOOLE_SOCK_TCP6: TCP IPv6 - | SWOOLE_SOCK_UDP: UDP - | SWOOLE_SOCK_UDP6: UDP IPv6 - | SWOOLE_UNIX_DGRAM: Unix socket dgram - | SWOOLE_UNIX_STREAM: Unix socket stream - | Enable SSL: $sock_type | SWOOLE_SSL. To enable SSL, check the configuration about SSL. - | https://www.swoole.co.uk/docs/modules/swoole-server-doc - | https://www.swoole.co.uk/docs/modules/swoole-server/configuration - | - */ - - 'socket_type' => defined('SWOOLE_SOCK_TCP') ? SWOOLE_SOCK_TCP : 1, - - /* - |-------------------------------------------------------------------------- - | Server Name - |-------------------------------------------------------------------------- - | - | This value represents the name of the server that will be - | displayed in the header of each request. - | - */ - - 'server' => env('LARAVELS_SERVER', 'LaravelS'), - - /* - |-------------------------------------------------------------------------- - | Handle Static Resource - |-------------------------------------------------------------------------- - | - | Whether handle the static resource by LaravelS(Require Swoole >= 1.7.21, Handle by Swoole if Swoole >= 1.9.17). - | Suggest that Nginx handles the statics and LaravelS handles the dynamics. - | The default path of static resource is base_path('public'), you can modify swoole.document_root to change it. - | - */ - - 'handle_static' => env('LARAVELS_HANDLE_STATIC', false), - - /* - |-------------------------------------------------------------------------- - | Laravel Base Path - |-------------------------------------------------------------------------- - | - | The basic path of Laravel, default base_path(), be used for symbolic link. - | - */ - - 'laravel_base_path' => env('LARAVEL_BASE_PATH', base_path()), - - /* - |-------------------------------------------------------------------------- - | Inotify Reload - |-------------------------------------------------------------------------- - | - | This feature requires inotify extension. - | https://github.com/hhxsv5/laravel-s#automatically-reload-after-modifying-code - | - */ - - 'inotify_reload' => [ - // Whether enable the Inotify Reload to reload all worker processes when your code is modified. - 'enable' => env('LARAVELS_INOTIFY_RELOAD', false), - - // The file path that Inotify watches - 'watch_path' => base_path(), - - // The file types that Inotify watches - 'file_types' => ['.php'], - - // The excluded/ignored directories that Inotify watches - 'excluded_dirs' => [], - - // Whether output the reload log - 'log' => true, - ], - - /* - |-------------------------------------------------------------------------- - | Swoole Event Handlers - |-------------------------------------------------------------------------- - | - | Configure the event callback function of Swoole, key-value format, - | key is the event name, and value is the class that implements the event - | processing interface. - | - | https://github.com/hhxsv5/laravel-s#configuring-the-event-callback-function-of-swoole - | - */ - - 'event_handlers' => [], - - /* - |-------------------------------------------------------------------------- - | WebSockets - |-------------------------------------------------------------------------- - | - | Swoole WebSocket Server settings. - | - | https://github.com/hhxsv5/laravel-s#enable-websocket-server - | - */ - - 'websocket' => [ - 'enable' => false, - // 'handler' => XxxWebSocketHandler::class, - ], - - /* - |-------------------------------------------------------------------------- - | Sockets - multi-port mixed protocol - |-------------------------------------------------------------------------- - | - | The socket(port) list for TCP/UDP. - | - | https://github.com/hhxsv5/laravel-s#multi-port-mixed-protocol - | - */ - - 'sockets' => [], - - /* - |-------------------------------------------------------------------------- - | Custom Process - |-------------------------------------------------------------------------- - | - | Support developers to create custom processes for monitoring, - | reporting, or other special tasks. - | - | https://github.com/hhxsv5/laravel-s#custom-process - | - */ - - 'processes' => [], - - /* - |-------------------------------------------------------------------------- - | Timer - |-------------------------------------------------------------------------- - | - | Wrapper cron job base on Swoole's Millisecond Timer, replace Linux Crontab. - | - | https://github.com/hhxsv5/laravel-s#millisecond-cron-job - | - */ - - 'timer' => [ - 'enable' => env('LARAVELS_TIMER', false), - - // The list of cron job - 'jobs' => [ - // Enable LaravelScheduleJob to run `php artisan schedule:run` every 1 minute, replace Linux Crontab - // Hhxsv5\LaravelS\Illuminate\LaravelScheduleJob::class, - ], - - // Max waiting time of reloading - 'max_wait_time' => 5, - - // Enable the global lock to ensure that only one instance starts the timer - // when deploying multiple instances. - // This feature depends on Redis https://laravel.com/docs/8.x/redis - 'global_lock' => false, - 'global_lock_key' => config('app.name', 'Laravel'), - ], - - /* - |-------------------------------------------------------------------------- - | Swoole Tables - |-------------------------------------------------------------------------- - | - | All defined tables will be created before Swoole starting. - | - | https://github.com/hhxsv5/laravel-s#use-swooletable - | - */ - - 'swoole_tables' => [], - - /* - |-------------------------------------------------------------------------- - | Re-register Providers - |-------------------------------------------------------------------------- - | - | The Service Provider list, will be re-registered each request, and run method boot() - | if it exists. Usually, be used to clear the Service Provider - | which registers Singleton instances. - | - | https://github.com/hhxsv5/laravel-s/blob/master/Settings.md#register_providers - | - */ - - 'register_providers' => [], - - /* - |-------------------------------------------------------------------------- - | Cleaners - |-------------------------------------------------------------------------- - | - | The list of cleaners for each request is used to clean up some residual - | global variables, singleton objects, and static properties to avoid - | data pollution between requests. - | - | https://github.com/hhxsv5/laravel-s/blob/master/Settings.md#cleaners - | - */ - - 'cleaners' => [], - - /* - |-------------------------------------------------------------------------- - | Destroy Controllers - |-------------------------------------------------------------------------- - | - | Automatically destroy the controllers after each request to solve - | the problem of the singleton controllers. - | - | https://github.com/hhxsv5/laravel-s/blob/master/KnownIssues.md#singleton-controller - | - */ - - 'destroy_controllers' => [ - 'enable' => false, - 'excluded_list' => [], - ], - - /* - |-------------------------------------------------------------------------- - | Swoole Settings - |-------------------------------------------------------------------------- - | - | Swoole's original configuration items. - | - | More settings - | Chinese https://wiki.swoole.com/#/server/setting - | English https://www.swoole.co.uk/docs/modules/swoole-server/configuration - | - */ - - 'swoole' => [ - 'daemonize' => env('LARAVELS_DAEMONIZE', false), - 'dispatch_mode' => env('LARAVELS_DISPATCH_MODE', 3), - 'worker_num' => env('LARAVELS_WORKER_NUM', 30), - //'task_worker_num' => env('LARAVELS_TASK_WORKER_NUM', 10), - 'task_ipc_mode' => 1, - 'task_max_request' => env('LARAVELS_TASK_MAX_REQUEST', 100000), - 'task_tmpdir' => @is_writable('/dev/shm/') ? '/dev/shm' : '/tmp', - 'max_request' => env('LARAVELS_MAX_REQUEST', 100000), - 'open_tcp_nodelay' => true, - 'pid_file' => storage_path('laravels.pid'), - 'log_level' => env('LARAVELS_LOG_LEVEL', 4), - 'log_file' => storage_path(sprintf('logs/swoole-%s.log', date('Y-m'))), - 'document_root' => base_path('public'), - 'buffer_output_size' => 2 * 1024 * 1024, - 'socket_buffer_size' => 8 * 1024 * 1024, - 'package_max_length' => 4 * 1024 * 1024, - 'reload_async' => true, - 'max_wait_time' => 60, - 'enable_reuse_port' => true, - 'enable_coroutine' => false, - 'upload_tmp_dir' => @is_writable('/dev/shm/') ? '/dev/shm' : '/tmp', - 'http_compression' => env('LARAVELS_HTTP_COMPRESSION', false), - ], - - 'cleaners' => [ - Hhxsv5\LaravelS\Illuminate\Cleaners\AuthCleaner::class, - ], -]; diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 0000000..5aa1dbb --- /dev/null +++ b/config/logging.php @@ -0,0 +1,122 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ + + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + 'ignore_exceptions' => false, + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'days' => 14, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => env('LOG_LEVEL', 'critical'), + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + ], + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => StreamHandler::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), + 'with' => [ + 'stream' => 'php://stderr', + ], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], + ], + +]; diff --git a/config/mail.php b/config/mail.php new file mode 100644 index 0000000..534395a --- /dev/null +++ b/config/mail.php @@ -0,0 +1,118 @@ + env('MAIL_MAILER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array", "failover" + | + */ + + 'mailers' => [ + 'smtp' => [ + 'transport' => 'smtp', + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'port' => env('MAIL_PORT', 587), + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'timeout' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN'), + ], + + 'ses' => [ + 'transport' => 'ses', + ], + + 'mailgun' => [ + 'transport' => 'mailgun', + ], + + 'postmark' => [ + 'transport' => 'postmark', + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + + 'failover' => [ + 'transport' => 'failover', + 'mailers' => [ + 'smtp', + 'log', + ], + ], + ], + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', 'Example'), + ], + + /* + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | + */ + + 'markdown' => [ + 'theme' => 'default', + + 'paths' => [ + resource_path('views/vendor/mail'), + ], + ], + +]; diff --git a/config/oauth.php b/config/oauth.php new file mode 100644 index 0000000..64a978a --- /dev/null +++ b/config/oauth.php @@ -0,0 +1,10 @@ + env('OAUTH_REDIRECT'), + 'client_id' => env('OAUTH_CLIENT_ID'), + 'client_secret' => env('OAUTH_CLIENT_SECRET'), + 'oauth_auth_url' => env('OAUTH_DOMAIN') . '/oauth/authorize', + 'oauth_token_url' => env('OAUTH_DOMAIN') . '/oauth/token', + 'oauth_user_url' => env('OAUTH_DOMAIN') . '/api/user', +]; \ No newline at end of file diff --git a/config/pay.php b/config/pay.php new file mode 100644 index 0000000..3453f4d --- /dev/null +++ b/config/pay.php @@ -0,0 +1,95 @@ + [ + 'default' => [ + // 必填-支付宝分配的 app_id + 'app_id' => env('ALIPAY_APP_ID'), + // 必填-应用私钥 字符串或路径 + 'app_secret_cert' => trim(file_get_contents(env('ALIPAY_APP_SECERT_CERT_PATH'))), + // 必填-应用公钥证书 路径 + 'app_public_cert_path' => env('ALIPAY_APP_PUBLIC_CERT_PATH'), + // 必填-支付宝公钥证书 路径 + 'alipay_public_cert_path' => env('ALIPAY_PUBLIC_CERT_PATH'), + // 必填-支付宝根证书 路径 + 'alipay_root_cert_path' => env('ALIPAY_ROOT_CERT_PATH'), + 'return_url' => env('ALIPAY_CALLBACK_RETURN_URL'), + 'notify_url' => env('ALIPAY_CALLBACK_NOTIFY_URL'), + // 选填-服务商模式下的服务商 id,当 mode 为 Pay::MODE_SERVICE 时使用该参数 + 'service_provider_id' => '', + // 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SANDBOX, MODE_SERVICE + 'mode' => Pay::MODE_NORMAL, + ], + ], + 'wechat' => [ + 'default' => [ + // 必填-商户号,服务商模式下为服务商商户号 + 'mch_id' => '', + // 必填-商户秘钥 + 'mch_secret_key' => '', + // 必填-商户私钥 字符串或路径 + 'mch_secret_cert' => '', + // 必填-商户公钥证书路径 + 'mch_public_cert_path' => '', + // 必填 + 'notify_url' => '', + // 选填-公众号 的 app_id + 'mp_app_id' => '', + // 选填-小程序 的 app_id + 'mini_app_id' => '', + // 选填-app 的 app_id + 'app_id' => '', + // 选填-合单 app_id + 'combine_app_id' => '', + // 选填-合单商户号 + 'combine_mch_id' => '', + // 选填-服务商模式下,子公众号 的 app_id + 'sub_mp_app_id' => '', + // 选填-服务商模式下,子 app 的 app_id + 'sub_app_id' => '', + // 选填-服务商模式下,子小程序 的 app_id + 'sub_mini_app_id' => '', + // 选填-服务商模式下,子商户id + 'sub_mch_id' => '', + // 选填-微信公钥证书路径, optional,强烈建议 php-fpm 模式下配置此参数 + 'wechat_public_cert_path' => [ + '45F59D4DABF31918AFCEC556D5D2C6E376675D57' => __DIR__ . '/Cert/wechatPublicKey.crt', + ], + // 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SERVICE + 'mode' => Pay::MODE_NORMAL, + ], + ], + 'unipay' => [ + 'default' => [ + // 必填-商户号 + 'mch_id' => '', + // 必填-商户公私钥 + 'mch_cert_path' => '', + // 必填-商户公私钥密码 + 'mch_cert_password' => '000000', + // 必填-银联公钥证书路径 + 'unipay_public_cert_path' => '', + // 必填 + 'return_url' => '', + // 必填 + 'notify_url' => '', + ], + ], + 'http' => [ // optional + 'timeout' => 5.0, + 'connect_timeout' => 5.0, + // 更多配置项请参考 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html) + ], + // optional,默认 warning;日志路径为:sys_get_temp_dir().'/logs/yansongda.pay.log' + 'logger' => [ + 'enable' => false, + 'file' => null, + 'level' => 'debug', + 'type' => 'single', // optional, 可选 daily. + 'max_file' => 30, + ], +]; diff --git a/config/queue.php b/config/queue.php index cdeaf4c..25ea5a8 100644 --- a/config/queue.php +++ b/config/queue.php @@ -7,13 +7,13 @@ | Default Queue Connection Name |-------------------------------------------------------------------------- | - | Lumen's queue API supports an assortment of back-ends via a single + | Laravel's queue API supports an assortment of back-ends via a single | API, giving you convenient access to each back-end using the same | syntax for every one. Here you may define a default connection. | */ - 'default' => 'redis', + 'default' => env('QUEUE_CONNECTION', 'sync'), /* |-------------------------------------------------------------------------- @@ -22,7 +22,7 @@ | | Here you may configure the connection information for each server that | is used by your application. A default configuration has been added - | for each back-end shipped with Lumen. You are free to add more. + | for each back-end shipped with Laravel. You are free to add more. | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" | @@ -36,9 +36,10 @@ 'database' => [ 'driver' => 'database', - 'table' => env('QUEUE_TABLE', 'jobs'), + 'table' => 'jobs', 'queue' => 'default', 'retry_after' => 90, + 'after_commit' => false, ], 'beanstalkd' => [ @@ -46,23 +47,28 @@ 'host' => 'localhost', 'queue' => 'default', 'retry_after' => 90, + 'block_for' => 0, + 'after_commit' => false, ], 'sqs' => [ 'driver' => 'sqs', - 'key' => env('SQS_KEY', 'your-public-key'), - 'secret' => env('SQS_SECRET', 'your-secret-key'), + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'your-queue-name'), - 'region' => env('SQS_REGION', 'us-east-1'), + 'queue' => env('SQS_QUEUE', 'default'), + 'suffix' => env('SQS_SUFFIX'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'after_commit' => false, ], 'redis' => [ 'driver' => 'redis', - 'connection' => env('QUEUE_REDIS_CONNECTION', 'default'), - 'queue' => 'default', + 'connection' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, 'block_for' => null, + 'after_commit' => false, ], ], @@ -81,7 +87,7 @@ 'failed' => [ 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => env('QUEUE_FAILED_TABLE', 'failed_jobs'), + 'table' => 'failed_jobs', ], ]; diff --git a/config/sanctum.php b/config/sanctum.php new file mode 100644 index 0000000..529cfdc --- /dev/null +++ b/config/sanctum.php @@ -0,0 +1,67 @@ + explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( + '%s%s', + 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', + Sanctum::currentApplicationUrlWithPort() + ))), + + /* + |-------------------------------------------------------------------------- + | Sanctum Guards + |-------------------------------------------------------------------------- + | + | This array contains the authentication guards that will be checked when + | Sanctum is trying to authenticate a request. If none of these guards + | are able to authenticate the request, Sanctum will use the bearer + | token that's present on an incoming request for authentication. + | + */ + + 'guard' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Expiration Minutes + |-------------------------------------------------------------------------- + | + | This value controls the number of minutes until an issued token will be + | considered expired. If this value is null, personal access tokens do + | not expire. This won't tweak the lifetime of first-party sessions. + | + */ + + 'expiration' => null, + + /* + |-------------------------------------------------------------------------- + | Sanctum Middleware + |-------------------------------------------------------------------------- + | + | When authenticating your first-party SPA with Sanctum you may need to + | customize some of the middleware Sanctum uses while processing the + | request. You may change the middleware listed below as required. + | + */ + + 'middleware' => [ + 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, + 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, + ], + +]; diff --git a/config/services.php b/config/services.php new file mode 100644 index 0000000..0ace530 --- /dev/null +++ b/config/services.php @@ -0,0 +1,34 @@ + [ + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), + 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', + ], + + 'postmark' => [ + 'token' => env('POSTMARK_TOKEN'), + ], + + 'ses' => [ + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + ], + +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..8fed97c --- /dev/null +++ b/config/session.php @@ -0,0 +1,201 @@ + env('SESSION_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => env('SESSION_LIFETIME', 120), + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | + */ + + 'encrypt' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => env('SESSION_CONNECTION'), + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | While using one of the framework's cache driven session backends you may + | list a cache store that should be used for these sessions. This value + | must match with one of the application's configured cache "stores". + | + | Affects: "apc", "dynamodb", "memcached", "redis" + | + */ + + 'store' => env('SESSION_STORE'), + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => env( + 'SESSION_COOKIE', + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' + ), + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => env('SESSION_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you when it can't be done securely. + | + */ + + 'secure' => env('SESSION_SECURE_COOKIE'), + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + + 'http_only' => true, + + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | will set this value to "lax" since this is a secure default value. + | + | Supported: "lax", "strict", "none", null + | + */ + + 'same_site' => 'lax', + +]; diff --git a/config/view.php b/config/view.php new file mode 100644 index 0000000..22b8a18 --- /dev/null +++ b/config/view.php @@ -0,0 +1,36 @@ + [ + resource_path('views'), + ], + + /* + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | + */ + + 'compiled' => env( + 'VIEW_COMPILED_PATH', + realpath(storage_path('framework/views')) + ), + +]; diff --git a/database/.gitignore b/database/.gitignore new file mode 100644 index 0000000..9b19b93 --- /dev/null +++ b/database/.gitignore @@ -0,0 +1 @@ +*.sqlite* diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 31f0a5d..41f8ae8 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -2,28 +2,39 @@ namespace Database\Factories; -use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; +use Illuminate\Support\Str; +/** + * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User> + */ class UserFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = User::class; - /** * Define the model's default state. * - * @return array + * @return array */ public function definition() { return [ - 'name' => $this->faker->name, - 'email' => $this->faker->unique()->safeEmail, + 'name' => fake()->name(), + 'email' => fake()->unique()->safeEmail(), + 'email_verified_at' => now(), + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password + 'remember_token' => Str::random(10), ]; } + + /** + * Indicate that the model's email address should be unverified. + * + * @return static + */ + public function unverified() + { + return $this->state(fn (array $attributes) => [ + 'email_verified_at' => null, + ]); + } } diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index fd235f8..6c81fd2 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -20,6 +20,7 @@ public function up() $table->string('token', 64)->unique(); $table->text('abilities')->nullable(); $table->timestamp('last_used_at')->nullable(); + $table->timestamp('expires_at')->nullable(); $table->timestamps(); }); } diff --git a/database/migrations/2022_08_09_090833_create_admins_table.php b/database/migrations/2022_08_09_090833_create_admins_table.php deleted file mode 100644 index 76d6cee..0000000 --- a/database/migrations/2022_08_09_090833_create_admins_table.php +++ /dev/null @@ -1,54 +0,0 @@ -id(); - - $table->string('name'); - $table->string('email')->unique(); - - $table->string('password'); - $table->string('api_token')->unique(); - - $table->softDeletes(); - - $table->timestamps(); - }); - - - // if env is not production, create admin user - if (env('APP_ENV') !== 'production') { - $admin = new Admin(); - $admin->name = 'admin'; - $admin->email = 'admin@admin.test'; - $admin->password = 'admin'; - $admin->api_token = 123456; - $admin->save(); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('admins'); - } -}; diff --git a/database/migrations/2022_08_12_082631_create_transcations_table.php b/database/migrations/2022_08_12_082631_create_transcations_table.php index f70b31a..7a0d875 100644 --- a/database/migrations/2022_08_12_082631_create_transcations_table.php +++ b/database/migrations/2022_08_12_082631_create_transcations_table.php @@ -1,6 +1,5 @@ unsignedBigInteger('user_id')->index(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - + $table->boolean('is_pending')->default(false)->index(); diff --git a/database/migrations/2022_09_08_142023_create_access_tokens_table.php b/database/migrations/2022_09_08_142023_create_access_tokens_table.php deleted file mode 100644 index 84fa21e..0000000 --- a/database/migrations/2022_09_08_142023_create_access_tokens_table.php +++ /dev/null @@ -1,36 +0,0 @@ -string('token', 64)->primary()->unique(); - - $table->unsignedBigInteger('user_id')->index(); - $table->foreign('user_id')->references('id')->on('users'); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('access_tokens'); - } -}; diff --git a/database/migrations/2022_09_14_214642_drop_transcations_table.php b/database/migrations/2022_09_14_214642_drop_transcations_table.php index 1e4aa7f..0e2914e 100644 --- a/database/migrations/2022_09_14_214642_drop_transcations_table.php +++ b/database/migrations/2022_09_14_214642_drop_transcations_table.php @@ -1,7 +1,6 @@ hasTable('transactions')) { + return true; + } + Schema::connection('mongodb')->create('transactions', function (Blueprint $collection) { $collection->unsignedBigInteger('user_id')->index(); $collection->unsignedBigInteger( diff --git a/database/migrations/2022_10_03_123715_convert_user_drops.php b/database/migrations/2022_10_03_123715_convert_user_drops.php index 817d5f6..df7c26e 100644 --- a/database/migrations/2022_10_03_123715_convert_user_drops.php +++ b/database/migrations/2022_10_03_123715_convert_user_drops.php @@ -1,8 +1,8 @@ call('UsersTableSeeder'); + // \App\Models\User::factory(10)->create(); + + // \App\Models\User::factory()->create([ + // 'name' => 'Test User', + // 'email' => 'test@example.com', + // ]); } } diff --git a/lang/en/auth.php b/lang/en/auth.php new file mode 100644 index 0000000..6598e2c --- /dev/null +++ b/lang/en/auth.php @@ -0,0 +1,20 @@ + 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/lang/en/pagination.php b/lang/en/pagination.php new file mode 100644 index 0000000..d481411 --- /dev/null +++ b/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/lang/en/passwords.php b/lang/en/passwords.php new file mode 100644 index 0000000..2345a56 --- /dev/null +++ b/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Your password has been reset!', + 'sent' => 'We have emailed your password reset link!', + 'throttled' => 'Please wait before retrying.', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that email address.", + +]; diff --git a/lang/en/validation.php b/lang/en/validation.php new file mode 100644 index 0000000..5ea01fa --- /dev/null +++ b/lang/en/validation.php @@ -0,0 +1,174 @@ + 'The :attribute must be accepted.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute must only contain letters.', + 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', + 'alpha_num' => 'The :attribute must only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute must be between :min and :max.', + 'string' => 'The :attribute must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', + 'email' => 'The :attribute must be a valid email address.', + 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'numeric' => 'The :attribute must be greater than :value.', + 'string' => 'The :attribute must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal to :value.', + 'string' => 'The :attribute must be greater than or equal to :value characters.', + ], + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'lt' => [ + 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', + 'string' => 'The :attribute must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal to :value.', + 'string' => 'The :attribute must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute must not have more than :max items.', + 'file' => 'The :attribute must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute must not be greater than :max.', + 'string' => 'The :attribute must not be greater than :max characters.', + ], + 'max_digits' => 'The :attribute must not have more than :max digits.', + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'numeric' => 'The :attribute must be at least :min.', + 'string' => 'The :attribute must be at least :min characters.', + ], + 'min_digits' => 'The :attribute must have at least :min digits.', + 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'password' => [ + 'letters' => 'The :attribute must contain at least one letter.', + 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute must contain at least one number.', + 'symbols' => 'The :attribute must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', + 'numeric' => 'The :attribute must be :size.', + 'string' => 'The :attribute must be :size characters.', + ], + 'starts_with' => 'The :attribute must start with one of the following: :values.', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute must be a valid URL.', + 'uuid' => 'The :attribute must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; diff --git a/package.json b/package.json new file mode 100644 index 0000000..36489d9 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build" + }, + "devDependencies": { + "axios": "^1.1.2", + "laravel-vite-plugin": "^0.6.0", + "lodash": "^4.17.19", + "postcss": "^8.1.14", + "vite": "^3.0.0" + } +} diff --git a/phpunit.xml b/phpunit.xml index 853e786..2ac86a1 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -5,13 +5,27 @@ colors="true" > - - ./tests + + ./tests/Unit + + + ./tests/Feature + + + ./app + + + + + + + + diff --git a/public/.htaccess b/public/.htaccess index b75525b..3aec5e2 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -14,7 +14,7 @@ RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] - # Handle Front Controller... + # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/index.php b/public/index.php index 04aa086..1d69f3a 100644 --- a/public/index.php +++ b/public/index.php @@ -1,28 +1,55 @@ run(); +$app = require_once __DIR__.'/../bootstrap/app.php'; + +$kernel = $app->make(Kernel::class); + +$response = $kernel->handle( + $request = Request::capture() +)->send(); + +$kernel->terminate($request, $response); diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/resources/css/app.css b/resources/css/app.css new file mode 100644 index 0000000..e69de29 diff --git a/resources/js/app.js b/resources/js/app.js new file mode 100644 index 0000000..e59d6a0 --- /dev/null +++ b/resources/js/app.js @@ -0,0 +1 @@ +import './bootstrap'; diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js new file mode 100644 index 0000000..dd9928e --- /dev/null +++ b/resources/js/bootstrap.js @@ -0,0 +1,34 @@ +import _ from 'lodash'; +import axios from 'axios'; + +window._ = _; + +/** + * We'll load the axios HTTP library which allows us to easily issue requests + * to our Laravel back-end. This library automatically handles sending the + * CSRF token as a header based on the value of the "XSRF" token cookie. + */ +window.axios = axios; + +window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; + +/** + * Echo exposes an expressive API for subscribing to channels and listening + * for events that are broadcast by Laravel. Echo and event broadcasting + * allows your team to easily build robust real-time web applications. + */ + +// import Echo from 'laravel-echo'; + +// import Pusher from 'pusher-js'; +// window.Pusher = Pusher; + +// window.Echo = new Echo({ +// broadcaster: 'pusher', +// key: import.meta.env.VITE_PUSHER_APP_KEY, +// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, +// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, +// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, +// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', +// enabledTransports: ['ws', 'wss'], +// }); diff --git a/resources/views/banned.blade.php b/resources/views/banned.blade.php new file mode 100644 index 0000000..d3003cb --- /dev/null +++ b/resources/views/banned.blade.php @@ -0,0 +1,19 @@ + + + + + + + + + 您已被封禁 + + + +

很抱歉,您可能违反了我们的规定。

+

{{ auth()->user()->banned_reason }}

+ + 更换账号 + + + diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php new file mode 100644 index 0000000..79ae86f --- /dev/null +++ b/resources/views/index.blade.php @@ -0,0 +1,71 @@ + + + + + + + + + + + + {{-- display all errors --}} + @if ($errors->any()) +
+
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+ @endif + + @if (session('success')) +

{{ session('success') }}

+ @endif + @if (session('error')) +

{{ session('error') }}

+ @endif + + @if (session('token')) +

这是新的 Token,请妥善保管:{{ session('token') }}

+ {{-- 前往 --}} + @endif + + @guest +

嗨,游客

+

您需要先登录,才能使用 莱云 Access Token Manager.

+ + 登录 + @endguest + + + @auth +

嗨, {{ auth('web')->user()->name }} +

在这里,你可以获取新的 Token 来对接其他应用程序。

+ +
+ @csrf + + +
+ +
+

如果你需要撤销对所有应用程序的授权,你可以在这里吊销所有 Token

+
+ @csrf + @method('delete') + +
+

*如果您的 Token 被泄漏,您应该立即吊销所有 Token

+ +
+

退出登录

+
+ @csrf + +
+ @endauth + + + diff --git a/resources/views/not_verified.blade.php b/resources/views/not_verified.blade.php new file mode 100644 index 0000000..111eb3b --- /dev/null +++ b/resources/views/not_verified.blade.php @@ -0,0 +1,20 @@ + + + + + + + + + 我们无法让您继续 + + + +

我们无法让您继续

+

您的账户尚未通过实名验证,因此无法使用此功能。

+

请到这里实名验证,然后再重新登录。

+ + 重新登录 + + + diff --git a/routes/api.php b/routes/api.php index 8e30eee..53afaa3 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,111 +1,38 @@ get('/users', [ - 'uses' => 'UserController@index' -]); +Route::get('user', [UserController::class, 'index']); +Route::get('users', [UserController::class, 'index']); +Route::get('servers', ServerController::class); +Route::get('modules', [ModuleController::class, 'index']); +Route::get('tasks', TaskController::class); -$router->get('/servers', [ - 'uses' => 'ServerController' -]); +Route::get('forum/announcements', [ForumController::class, 'pinned']); +Route::get('forum/pinned', [ForumController::class, 'announcements']); -$router->get('/modules', [ - 'uses' => 'User\ModuleController' -]); +Route::get('hosts/usages', [HostController::class, 'usages']); +Route::resource('hosts', HostController::class); -$router->group(['prefix' => 'hosts'], function () use ($router) { - $router->get('/', [ - 'uses' => 'User\HostController@index' - ]); - $router->get('/usages', [ - 'uses' => 'User\HostController@usages' - ]); - $router->patch('/{host}', [ - 'uses' => 'User\HostController@update' - ]); - $router->delete('/{host}', [ - 'uses' => 'User\HostController@destroy' - ]); -}); +Route::resource('balances', BalanceController::class)->only(['index', 'store']); +Route::get('balances/transactions', [BalanceController::class, 'transactions']); +Route::get('balances/drops', [BalanceController::class, 'drops']); + +Route::resource('work-orders', WorkOrderController::class)->only(['index', 'store', 'show']); + +Route::resource('work-orders.replies', ReplyController::class)->only(['index', 'store']); -$router->group(['prefix' => 'balances'], function () use ($router) { - $router->get('/', [ - 'uses' => 'User\BalanceController@index' - ]); +// 匹配 modules/{module} 的路由,正则匹配斜杠 +Route::any('modules/{module}/{path?}', [ModuleController::class, 'call']) + ->where('path', '.*'); - $router->post('/', [ - 'uses' => 'User\BalanceController@store' - ]); - - - $router->get('/transactions', [ - 'uses' => 'User\BalanceController@transactions' - ]); - - $router->get('/drops', [ - 'uses' => 'User\BalanceController@drops' - ]); -}); - -$router->get('/tasks', [ - 'uses' => 'User\TaskController' -]); - -$router->group(['prefix' => 'work-orders'], function () use ($router) { - $router->get('/', [ - 'uses' => 'User\WorkOrder\WorkOrderController@index' - ]); - $router->post('/', [ - 'uses' => 'User\WorkOrder\WorkOrderController@store' - ]); - $router->get('/{workOrder}', [ - 'uses' => 'User\WorkOrder\WorkOrderController@show' - ]); - $router->patch('/{workOrder}', [ - 'uses' => 'User\WorkOrder\WorkOrderController@update' - ]); - $router->delete('/{workOrder}', [ - 'uses' => 'User\WorkOrder\WorkOrderController@destroy' - ]); - - $router->get('/{workOrder}/replies', [ - 'uses' => 'User\WorkOrder\ReplyController@index' - ]); - $router->post('/{workOrder}/replies', [ - 'uses' => 'User\WorkOrder\ReplyController@store' - ]); - - // $router->group(['prefix' => ''], function () use ($router) { - - // // $router->patch('/{reply}', [ - // // 'uses' => 'User\WorkOrder\ReplyController@update' - // // ]); - // // $router->delete('/{reply}', [ - // // 'uses' => 'User\WorkOrder\ReplyController@destroy' - // // ]); - // }); -}); - - -$router->group(['prefix' => 'forum'], function () use ($router) { - $router->get('/announcements', [ - 'uses' => 'ForumController@announcements' - ]); - - $router->get('/pinned', [ - 'uses' => 'ForumController@pinned' - ]); -}); - -$router->group(['prefix' => 'modules/{module}'], function () use ($router) { - $controller = 'Remote\ModuleController@call'; - $router->get('/{route:.*}/', $controller); - $router->post('/{route:.*}/', $controller); - $router->put('/{route:.*}/', $controller); - $router->patch('/{route:.*}/', $controller); - $router->delete('/{route:.*}/', $controller); -}); - -$router->post('broadcasting/auth', ['uses' => 'BroadcastController@authenticate']); diff --git a/routes/old/console.php b/routes/console.php similarity index 100% rename from routes/old/console.php rename to routes/console.php diff --git a/routes/old/admin.php b/routes/old/admin.php deleted file mode 100644 index af94e06..0000000 --- a/routes/old/admin.php +++ /dev/null @@ -1,28 +0,0 @@ -middleware(['admin'])->group(function () { - Route::apiResource('admins', Admin\Admin\AdminController::class); - - Route::apiResource('users', Admin\User\UserController::class); - Route::apiResource('users.drops', Admin\User\DropController::class); - Route::apiResource('users.work-orders', Admin\WorkOrder\WorkOrderController::class); - Route::apiResource('users.hosts', Admin\Host\HostController::class); - - // Route::apiResource('drops', Admin\User\DropController::class); - - // work orders - // Route::apiResource('work-orders', Admin\WorkOrder\WorkOrderController::class); - - - - // Route::resource('users.fields', v1\User\FieldsController::class)->only(['index']); - - // sub routes for clients - // Route::apiResource('clients', Admin\Client\ClientController::class); - - // clients.balance - // Route::apiResource('clients.balances', Admin\Client\BalanceController::class); -}); diff --git a/routes/old/api.php b/routes/old/api.php deleted file mode 100644 index 851509f..0000000 --- a/routes/old/api.php +++ /dev/null @@ -1,33 +0,0 @@ -middleware(['api', 'auth:sanctum'])->group(function () { - Route::apiResource('users', UserController::class); - Route::get('servers', ServerController::class); - Route::apiResource('hosts', HostController::class)->only(['index', 'update', 'destroy']); - - - Route::apiResource('balances', BalanceController::class)->only(['index', 'store']); - // Route::apiResource('drops', DropController::class); - - Route::get('tasks', TaskController::class); - - Route::apiResource('work-orders', WorkOrderController::class); - Route::apiResource('work-orders.replies', ReplyController::class); - - // 调用远程 API - Route::any('/modules/{module}', [ModuleController::class, 'call'])->name('module.call'); -}); - - -Route::get('/pay/return', [BalanceController::class, 'return'])->name('balances.return'); -Route::get('/pay/notify', [BalanceController::class, 'notify'])->name('balances.notify'); diff --git a/routes/old/channels.php b/routes/old/channels.php deleted file mode 100644 index 5d451e1..0000000 --- a/routes/old/channels.php +++ /dev/null @@ -1,18 +0,0 @@ -id === (int) $id; -}); diff --git a/routes/old/remote.php b/routes/old/remote.php deleted file mode 100644 index 63b1883..0000000 --- a/routes/old/remote.php +++ /dev/null @@ -1,20 +0,0 @@ -middleware(['remote'])->group(function () { - // Route::apiResource('users', Remote\UserController::class)->only(['show']); - - Route::apiResource('modules', Remote\ModuleController::class)->only(['index']); - Route::apiResource('servers', \App\Http\Controllers\ServerController::class); - Route::apiResource('hosts', Remote\Host\HostController::class); - // Route::patch('hosts/{host}', [Remote\Host\DropController::class, 'update']); - // Route::patch('tasks', Remote\Host\TaskController::class); - Route::apiResource('tasks', Remote\Host\TaskController::class); - - Route::apiResource('work-orders', Remote\WorkOrder\WorkOrderController::class); - Route::apiResource('work-orders.replies', Remote\WorkOrder\ReplyController::class); - - // Route::apiResource('users', Controllers\User\UserController::class); -}); diff --git a/routes/old/web.php b/routes/old/web.php deleted file mode 100644 index c004df9..0000000 --- a/routes/old/web.php +++ /dev/null @@ -1,31 +0,0 @@ -group(function () { - Route::get('redirect', [Controllers\AuthController::class, 'redirect'])->name('login'); - Route::get('callback', [Controllers\AuthController::class, 'callback'])->name('callback'); -}); - -Route::middleware('auth')->group(function () { - Route::post('/createApiToken', [Controllers\AuthController::class, 'createApiToken'])->name('createApiToken'); - Route::delete('/invokeAllApiToken', [Controllers\AuthController::class, 'invokeAllApiToken'])->name('invokeAllApiToken'); -}); - -Route::get('/', [Controllers\AuthController::class, 'index'])->name('index'); - -Route::get('/balances/{balance}', [Controllers\User\BalanceController::class, 'show'])->name('balances.pay.show'); - - diff --git a/routes/remote.php b/routes/remote.php deleted file mode 100644 index 704219f..0000000 --- a/routes/remote.php +++ /dev/null @@ -1,114 +0,0 @@ -get('modules', [ - 'uses' => 'ModuleController@index' -]); - -$router->get('servers', [ - 'uses' => '\App\Http\Controllers\ServerController' -]); - -$router->group(['prefix' => 'hosts'], function () use ($router) { - $router->post('/', [ - 'uses' => 'Host\HostController@store' - ]); - $router->get('/{host}', [ - 'uses' => 'Host\HostController@show' - ]); - $router->patch('/{host}', [ - 'uses' => 'Host\HostController@update' - ]); - $router->delete('/{host}', [ - 'uses' => 'Host\HostController@destroy' - ]); -}); - - -$router->group(['prefix' => 'tasks'], function () use ($router) { - $router->post('/', [ - 'uses' => 'Host\TaskController@store' - ]); - $router->get('/{task}', [ - 'uses' => 'Host\TaskController@show' - ]); - $router->patch('/{task}', [ - 'uses' => 'Host\TaskController@update' - ]); - $router->delete('/{task}', [ - 'uses' => 'Host\TaskController@destroy' - ]); -}); - - - -$router->group(['prefix' => 'work-orders'], function () use ($router) { - $router->get('/', [ - 'uses' => 'WorkOrder\WorkOrderController@index' - ]); - $router->post('/', [ - 'uses' => 'WorkOrder\WorkOrderController@store' - ]); - $router->patch('/{workOrder}', [ - 'uses' => 'WorkOrder\WorkOrderController@update' - ]); - $router->delete('/{workOrder}', [ - 'uses' => 'WorkOrder\WorkOrderController@destroy' - ]); - - $router->group(['prefix' => '{workOrder}/replies'], function () use ($router) { - $router->get('/', [ - 'uses' => 'WorkOrder\ReplyController@index' - ]); - $router->post('/', [ - 'uses' => 'WorkOrder\ReplyController@store' - ]); - $router->patch('/{reply}', [ - 'uses' => 'WorkOrder\ReplyController@update' - ]); - $router->delete('/{reply}', [ - 'uses' => 'WorkOrder\ReplyController@destroy' - ]); - }); -}); - - -// 模块间调用 - -$router->group(['prefix' => 'modules/{module}'], function () use ($router) { - $controller = 'ModuleController@exportCall'; - $router->get('/{route:.*}/', $controller); - $router->post('/{route:.*}/', $controller); - $router->put('/{route:.*}/', $controller); - $router->patch('/{route:.*}/', $controller); - $router->delete('/{route:.*}/', $controller); -}); - - -// 用户信息 -$router->get('users', [ - 'uses' => '\App\Http\Controllers\Remote\UserController@index' -]); - -$router->get('users/{user}', [ - 'uses' => '\App\Http\Controllers\Remote\UserController@show' -]); - -$router->post('users/{user}/reduce', [ - 'uses' => '\App\Http\Controllers\Remote\UserController@reduce' -]); - -$router->get('users/{user}/hosts', [ - 'uses' => '\App\Http\Controllers\Remote\UserController@hosts' -]); - - -$router->post('broadcast/users/{user}', [ - 'uses' => '\App\Http\Controllers\Remote\BroadcastController@broadcast_to_user' -]); - -$router->post('broadcast/hosts/{host}', [ - 'uses' => '\App\Http\Controllers\Remote\BroadcastController@broadcast_to_host' -]); diff --git a/routes/web.php b/routes/web.php index f4ee247..23b03bb 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,60 +1,33 @@ get('/', [ - 'uses' => 'IndexController' -]); +Route::prefix('auth')->group(function () { + Route::get('redirect', [AuthController::class, 'redirect'])->name('login'); + Route::get('callback', [AuthController::class, 'callback'])->name('callback'); +}); -$router->get('/balances/{balance}', [ - 'as' => 'balances.pay.show', - 'uses' => 'User\BalanceController@show' -]); +Route::get('/', [AuthController::class, 'index'])->name('index'); +Route::view('not_verified', 'not_verified')->name('not_verified'); -$router->get('/pay/return', [ - 'as' => 'balances.return', - 'uses' => 'User\BalanceController@return' -]); +Route::middleware(['auth'])->group(function () { + Route::view('banned', 'banned')->name('banned'); -$router->get('/pay/notify', [ - 'as' => 'balances.notify', - 'uses' => 'User\BalanceController@notify' -]); + Route::post('/newToken', [AuthController::class, 'newToken'])->name('newToken'); + Route::delete('/deleteAll', [AuthController::class, 'deleteAll'])->name('deleteAll'); + + // logout + Route::post('/logout', [AuthController::class, 'logout'])->name('logout'); +}); - -// $router->group(['prefix' => 'auth', 'middleware' => 'session'], function () use ($router) { -// $router->get('redirect', [ -// 'as' => 'login', -// 'uses' => 'AuthController@redirect' -// ]); - -// $router->get('callback', [ -// 'as' => 'callback', -// 'uses' => 'AuthController@callback' -// ]); -// }); - -// auth controller - -// Route::prefix('auth')->group(function () { -// Route::get('redirect', [Controllers\AuthController::class, 'redirect'])->name('login'); -// Route::get('callback', [Controllers\AuthController::class, 'callback'])->name('callback'); -// }); - -// Route::middleware('auth')->group(function () { -// Route::post('/createApiToken', [Controllers\AuthController::class, 'createApiToken'])->name('createApiToken'); -// Route::delete('/invokeAllApiToken', [Controllers\AuthController::class, 'invokeAllApiToken'])->name('invokeAllApiToken'); -// }); +Route::get('/balance/{balance}', [BalanceController::class, 'show'])->name('balances.pay.show'); +Route::get('/pay/return', [BalanceController::class, 'return'])->name('balances.alipay.return'); +Route::get('/pay/notify', [BalanceController::class, 'notify'])->name('balances.alipay.notify'); -// Route::get('/balances/{balance}', [Controllers\User\BalanceController::class, 'show'])->name('balances.pay.show'); +Route::get('/pay', function () { - - - -// $router->get('/', []); - -// $router->get('/', function () use ($router) { -// return $router->app->version(); -// }); +}); diff --git a/storage/app/.gitignore b/storage/app/.gitignore index d6b7ef3..8f4803c 100644 --- a/storage/app/.gitignore +++ b/storage/app/.gitignore @@ -1,2 +1,3 @@ * +!public/ !.gitignore diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/app/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore new file mode 100644 index 0000000..05c4471 --- /dev/null +++ b/storage/framework/.gitignore @@ -0,0 +1,9 @@ +compiled.php +config.php +down +events.scanned.php +maintenance.php +routes.php +routes.scanned.php +schedule-* +services.json diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/testing/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php new file mode 100644 index 0000000..547152f --- /dev/null +++ b/tests/CreatesApplication.php @@ -0,0 +1,22 @@ +make(Kernel::class)->bootstrap(); + + return $app; + } +} diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php new file mode 100644 index 0000000..1eafba6 --- /dev/null +++ b/tests/Feature/ExampleTest.php @@ -0,0 +1,21 @@ +get('/'); + + $response->assertStatus(200); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..2932d4a --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,10 @@ +assertTrue(true); + } +} diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..3ff37d5 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,11 @@ +import {defineConfig} from 'vite'; +import laravel from 'laravel-vite-plugin'; + +export default defineConfig({ + plugins: [ + laravel({ + input: ['resources/css/app.css', 'resources/js/app.js'], + refresh: true, + }), + ], +});