优化代码

This commit is contained in:
iVampireSP.com 2022-12-11 19:47:30 +08:00
parent 997b58cda3
commit d4b3ff6608
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
37 changed files with 146 additions and 143 deletions

View File

@ -34,7 +34,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return int
*/
public function handle()
{

View File

@ -34,7 +34,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return int
*/
public function handle()
{

View File

@ -39,7 +39,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return int
*/
public function handle()
{

View File

@ -37,7 +37,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return int
*/
public function handle()
{

View File

@ -56,7 +56,7 @@ public function handle()
$mqtt->subscribe('some/topic', function (string $topic, string $message) {
echo sprintf('Received QoS level 1 message on topic [%s]: %s', $topic, $message) . PHP_EOL;
}, 1);
$mqtt->loop(true);
$mqtt->loop();
return true;
},

View File

@ -35,7 +35,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return void
*/
public function handle()
{

View File

@ -35,7 +35,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return int
*/
public function handle()
{

View File

@ -34,7 +34,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return void
*/
public function handle()
{

View File

@ -34,7 +34,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return void
*/
public function handle()
{

View File

@ -36,7 +36,7 @@ public function __construct()
/**
* Execute the console command.
*
* @return mixed
* @return int
*/
public function handle()
{

View File

@ -4,6 +4,9 @@
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable;
@ -41,9 +44,8 @@ class Handler extends ExceptionHandler
/**
* Register the exception handling callbacks for the application.
*
* @return void
*/
public function register()
public function register(): void
{
$this->reportable(function (Throwable $e) {
// custom json 404 response
@ -57,17 +59,19 @@ public function register()
], 404);
}
});
return;
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @param Request $request
* @param AuthenticationException $exception
*
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response
* @return JsonResponse|RedirectResponse
*/
protected function unauthenticated($request, AuthenticationException $exception)
protected function unauthenticated($request, AuthenticationException $exception): JsonResponse|RedirectResponse
{
// if json request
if ($request->expectsJson()) {

View File

@ -82,7 +82,7 @@ public function unauthorized($message = 'Unauthorized'): JsonResponse
public function badRequest($message = 'Bad request'): JsonResponse
{
return $this->error($message, 400);
return $this->error($message);
}
// bad request
@ -94,9 +94,9 @@ public function created($message = 'Created'): JsonResponse
// created
public function success($data = []): JsonResponse
public function success($data = [], $status = 200): JsonResponse
{
return $this->apiResponse($data, 200);
return $this->apiResponse($data, $status);
}
// accepted

View File

@ -49,7 +49,7 @@ public function store(Request $request): RedirectResponse
]);
// 随机密码
$password = Str::random(16);
$password = Str::random();
$admin = Admin::create([
'email' => $request->email,
@ -89,7 +89,7 @@ public function update(Request $request, Admin $admin): RedirectResponse
if ($request->filled('reset_password')) {
// 随机密码
$password = Str::random(16);
$password = Str::random();
$msg .= ',新的密码为:' . $password;

View File

@ -21,7 +21,6 @@ class UserController extends Controller
/**
* Display a listing of the resource.
*
* @return View
*/
public function index(Request $request): View
{

View File

@ -5,7 +5,9 @@
use App\Http\Controllers\Controller;
use App\Models\WorkOrder\Reply;
use App\Models\WorkOrder\WorkOrder;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use function auth;
class ReplyController extends Controller
@ -29,9 +31,10 @@ public function index(WorkOrder $workOrder)
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param Request $request
* @param WorkOrder $workOrder
*
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response
* @return JsonResponse|Response
*/
public function store(Request $request, WorkOrder $workOrder)
{

View File

@ -17,7 +17,7 @@ class HostController extends Controller
/**
* Display a listing of the resource.
*
* @return Paginator
*
*/
public function index(Request $request): Paginator
{

View File

@ -28,9 +28,7 @@ public function index(Request $request): JsonResponse
/**
* Store a newly created resource in storage.
*
* @param Request $request
*
* @return JsonResponse
*/
public function store(Request $request, WorkOrder $work_order): JsonResponse
{

View File

@ -13,10 +13,12 @@ class Authenticate extends Middleware
*
* @return string|null
*/
protected function redirectTo($request)
protected function redirectTo($request): ?string
{
if (!$request->expectsJson()) {
return route('index');
}
return null;
}
}

View File

@ -24,6 +24,6 @@ public function __construct()
public function handle()
{
// closed replied after 1 days
WorkOrder::where('status', 'replied')->where('updated_at', '<=', now()->subDays(1))->update(['status' => 'closed']);
WorkOrder::where('status', 'replied')->where('updated_at', '<=', now()->subDays())->update(['status' => 'closed']);
}
}

View File

@ -62,13 +62,9 @@ public function checkAndCharge(Balance $balance, $check = false): bool
$balance->update([
'paid_at' => now()
]);
} catch (InvalidResponseException $e) {
} catch (InvalidResponseException|ChargeException $e) {
Log::error($e->getMessage());
return false;
} catch (ChargeException $e) {
Log::error($e->getMessage());
return false;
}
return true;

View File

@ -32,6 +32,6 @@ public function __construct()
public function handle()
{
// 删除所有大于 1 天的任务
Task::where('created_at', '<', now()->subDays(1))->delete();
Task::where('created_at', '<', now()->subDay())->delete();
}
}

View File

@ -30,7 +30,7 @@ public function __construct(Module $module)
*
* @param mixed $notifiable
*
* @return MailMessage
* @return void
*/
public function toGroup($notifiable)
{

View File

@ -2,7 +2,6 @@
namespace App\Notifications;
use App\Broadcasting\WeComRobotChannel;
use App\Models\Balance;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
@ -29,14 +28,14 @@ public function __construct()
*
* @param mixed $notifiable
*
* @return array
* @return void
*/
// public function via($notifiable)
// {
// // return [WeComRobotChannel::class];
// }
public function toGroup($notifiable)
public function toGroup(mixed $notifiable): void
{
if ($notifiable instanceof Balance) {

View File

@ -12,7 +12,7 @@ class BalanceObserve
*
* @param \App\Models\Balance $balance
*
* @return void
* @return array
*/
public function created(Balance $balance)
{
@ -26,7 +26,7 @@ public function created(Balance $balance)
*
* @param \App\Models\Balance $balance
*
* @return void
* @return array
*/
public function updated(Balance $balance)
{

View File

@ -12,7 +12,7 @@ class ReplyObserver
*
* @param \App\Models\WorkOrder\Reply $reply
*
* @return void
* @return void|null
*/
public function created(Reply $reply)
{

View File

@ -13,7 +13,7 @@ class WorkOrderObserver
*
* @param \App\Models\WorkOrder\WorkOrder $workOrder
*
* @return void
* @return void|null
*/
public function created(WorkOrder $workOrder)
{
@ -27,7 +27,7 @@ public function created(WorkOrder $workOrder)
*
* @param \App\Models\WorkOrder\WorkOrder $workOrder
*
* @return void
* @return void|null
*/
public function updated(WorkOrder $workOrder)
{

View File

@ -23,7 +23,7 @@ public function __construct($title)
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*/
public function render()
{

View File

@ -23,7 +23,7 @@ public function __construct($status)
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*/
public function render()
{

View File

@ -24,7 +24,7 @@ public function __construct(Module $module)
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*/
public function render()
{

View File

@ -20,7 +20,7 @@ public function __construct()
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*/
public function render()
{

View File

@ -22,7 +22,7 @@ public function __construct($payment)
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*/
public function render()
{

View File

@ -23,7 +23,7 @@ public function __construct($status)
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*/
public function render()
{

178
composer.lock generated
View File

@ -3556,16 +3556,16 @@
},
{
"name": "php-mqtt/client",
"version": "v1.6.0",
"version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/php-mqtt/client.git",
"reference": "22a207edef01d5f0ed3a6a79565cc425b678d786"
"reference": "846f0de5c5713d947892998f868e6b28607fc0a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-mqtt/client/zipball/22a207edef01d5f0ed3a6a79565cc425b678d786",
"reference": "22a207edef01d5f0ed3a6a79565cc425b678d786",
"url": "https://api.github.com/repos/php-mqtt/client/zipball/846f0de5c5713d947892998f868e6b28607fc0a0",
"reference": "846f0de5c5713d947892998f868e6b28607fc0a0",
"shasum": "",
"mirrors": [
{
@ -3613,9 +3613,9 @@
],
"support": {
"issues": "https://github.com/php-mqtt/client/issues",
"source": "https://github.com/php-mqtt/client/tree/v1.6.0"
"source": "https://github.com/php-mqtt/client/tree/v1.7.0"
},
"time": "2022-11-01T20:00:19+00:00"
"time": "2022-12-09T17:02:12+00:00"
},
{
"name": "php-mqtt/laravel-client",
@ -4610,16 +4610,16 @@
},
{
"name": "spiral/core",
"version": "3.3.0",
"version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/spiral/core.git",
"reference": "dbf4e3fd37a815f924b9102441b8cdaf57e2f060"
"reference": "4e721be8d121da24a0fd76912b99556c3b05edb6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spiral/core/zipball/dbf4e3fd37a815f924b9102441b8cdaf57e2f060",
"reference": "dbf4e3fd37a815f924b9102441b8cdaf57e2f060",
"url": "https://api.github.com/repos/spiral/core/zipball/4e721be8d121da24a0fd76912b99556c3b05edb6",
"reference": "4e721be8d121da24a0fd76912b99556c3b05edb6",
"shasum": "",
"mirrors": [
{
@ -4640,7 +4640,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3.x-dev"
"dev-master": "3.4.x-dev"
}
},
"autoload": {
@ -4676,7 +4676,7 @@
"issues": "https://github.com/spiral/framework/issues",
"source": "https://github.com/spiral/core"
},
"time": "2022-10-21T09:40:00+00:00"
"time": "2022-12-08T07:54:31+00:00"
},
{
"name": "spiral/goridge",
@ -4748,16 +4748,16 @@
},
{
"name": "spiral/logger",
"version": "3.3.0",
"version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/spiral/logger.git",
"reference": "88849efc338d049cd0d66024f610b4a6f86c925a"
"reference": "a8bd62d4b7144d1683185792a3c689118c16868e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spiral/logger/zipball/88849efc338d049cd0d66024f610b4a6f86c925a",
"reference": "88849efc338d049cd0d66024f610b4a6f86c925a",
"url": "https://api.github.com/repos/spiral/logger/zipball/a8bd62d4b7144d1683185792a3c689118c16868e",
"reference": "a8bd62d4b7144d1683185792a3c689118c16868e",
"shasum": "",
"mirrors": [
{
@ -4769,7 +4769,7 @@
"require": {
"php": ">=8.1",
"psr/log": "1 - 3",
"spiral/core": "^3.3"
"spiral/core": "^3.4"
},
"require-dev": {
"mockery/mockery": "^1.5",
@ -4779,7 +4779,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3.x-dev"
"dev-master": "3.4.x-dev"
}
},
"autoload": {
@ -4815,7 +4815,7 @@
"issues": "https://github.com/spiral/framework/issues",
"source": "https://github.com/spiral/logger"
},
"time": "2022-10-21T09:43:40+00:00"
"time": "2022-11-18T08:00:04+00:00"
},
{
"name": "spiral/roadrunner",
@ -5076,16 +5076,16 @@
},
{
"name": "spiral/tokenizer",
"version": "3.3.0",
"version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/spiral/tokenizer.git",
"reference": "5659b0ae6154f366633b6cd432742b5a4976a80b"
"reference": "cbfd4b6f63f19d51f6a9d4284c2f8343041e3e58"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spiral/tokenizer/zipball/5659b0ae6154f366633b6cd432742b5a4976a80b",
"reference": "5659b0ae6154f366633b6cd432742b5a4976a80b",
"url": "https://api.github.com/repos/spiral/tokenizer/zipball/cbfd4b6f63f19d51f6a9d4284c2f8343041e3e58",
"reference": "cbfd4b6f63f19d51f6a9d4284c2f8343041e3e58",
"shasum": "",
"mirrors": [
{
@ -5097,19 +5097,19 @@
"require": {
"ext-tokenizer": "*",
"php": ">=8.1",
"spiral/core": "^3.3",
"spiral/logger": "^3.3",
"spiral/core": "^3.4",
"spiral/logger": "^3.4",
"symfony/finder": "^5.3.7|^6.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.20",
"spiral/boot": "^3.3",
"spiral/boot": "^3.4",
"vimeo/psalm": "^4.27"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3.x-dev"
"dev-master": "3.4.x-dev"
}
},
"autoload": {
@ -5145,7 +5145,7 @@
"issues": "https://github.com/spiral/framework/issues",
"source": "https://github.com/spiral/tokenizer"
},
"time": "2022-10-26T10:24:55+00:00"
"time": "2022-11-18T08:03:04+00:00"
},
{
"name": "symfony/console",
@ -5322,16 +5322,16 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.1.1",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918"
"reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918",
"reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3",
"reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3",
"shasum": "",
"mirrors": [
{
@ -5346,7 +5346,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.1-dev"
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -5375,7 +5375,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0"
},
"funding": [
{
@ -5391,20 +5391,20 @@
"type": "tidelift"
}
],
"time": "2022-02-25T11:15:52+00:00"
"time": "2022-11-25T10:21:52+00:00"
},
{
"name": "symfony/error-handler",
"version": "v6.1.7",
"version": "v6.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504"
"reference": "d9894724a9d20afd3329e36b36e45835b5c2ab3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/699a26ce5ec656c198bf6e26398b0f0818c7e504",
"reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/d9894724a9d20afd3329e36b36e45835b5c2ab3e",
"reference": "d9894724a9d20afd3329e36b36e45835b5c2ab3e",
"shasum": "",
"mirrors": [
{
@ -5452,7 +5452,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/error-handler/tree/v6.1.7"
"source": "https://github.com/symfony/error-handler/tree/v6.2.0"
},
"funding": [
{
@ -5468,7 +5468,7 @@
"type": "tidelift"
}
],
"time": "2022-10-28T16:23:08+00:00"
"time": "2022-11-02T09:08:04+00:00"
},
{
"name": "symfony/event-dispatcher",
@ -5561,7 +5561,7 @@
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v3.1.0",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
@ -5626,7 +5626,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.0"
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1"
},
"funding": [
{
@ -5894,16 +5894,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.2.0",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "edc56ed49a2955383d59e9b7043fd3bbc26f1854"
"reference": "d0bbd5a7e81b38f32504399b9199f265505b7bac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/edc56ed49a2955383d59e9b7043fd3bbc26f1854",
"reference": "edc56ed49a2955383d59e9b7043fd3bbc26f1854",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0bbd5a7e81b38f32504399b9199f265505b7bac",
"reference": "d0bbd5a7e81b38f32504399b9199f265505b7bac",
"shasum": "",
"mirrors": [
{
@ -5958,7 +5958,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.2.0"
"source": "https://github.com/symfony/http-foundation/tree/v6.2.1"
},
"funding": [
{
@ -5974,20 +5974,20 @@
"type": "tidelift"
}
],
"time": "2022-11-21T16:03:04+00:00"
"time": "2022-12-04T18:26:13+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v6.1.8",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "6073eaed148f4c0b8d4ae33e7332b34327ef728e"
"reference": "bcbd2ea12fee651a4c8bff4f6f00cce2ac1f8404"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/6073eaed148f4c0b8d4ae33e7332b34327ef728e",
"reference": "6073eaed148f4c0b8d4ae33e7332b34327ef728e",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/bcbd2ea12fee651a4c8bff4f6f00cce2ac1f8404",
"reference": "bcbd2ea12fee651a4c8bff4f6f00cce2ac1f8404",
"shasum": "",
"mirrors": [
{
@ -5999,6 +5999,7 @@
"require": {
"php": ">=8.1",
"psr/log": "^1|^2|^3",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/error-handler": "^6.1",
"symfony/event-dispatcher": "^5.4|^6.0",
"symfony/http-foundation": "^5.4|^6.0",
@ -6009,7 +6010,7 @@
"symfony/cache": "<5.4",
"symfony/config": "<6.1",
"symfony/console": "<5.4",
"symfony/dependency-injection": "<6.1",
"symfony/dependency-injection": "<6.2",
"symfony/doctrine-bridge": "<5.4",
"symfony/form": "<5.4",
"symfony/http-client": "<5.4",
@ -6029,7 +6030,7 @@
"symfony/config": "^6.1",
"symfony/console": "^5.4|^6.0",
"symfony/css-selector": "^5.4|^6.0",
"symfony/dependency-injection": "^6.1",
"symfony/dependency-injection": "^6.2",
"symfony/dom-crawler": "^5.4|^6.0",
"symfony/expression-language": "^5.4|^6.0",
"symfony/finder": "^5.4|^6.0",
@ -6074,7 +6075,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.1.8"
"source": "https://github.com/symfony/http-kernel/tree/v6.2.1"
},
"funding": [
{
@ -6090,20 +6091,20 @@
"type": "tidelift"
}
],
"time": "2022-11-28T18:20:59+00:00"
"time": "2022-12-06T17:28:26+00:00"
},
{
"name": "symfony/mailer",
"version": "v6.2.0",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailer.git",
"reference": "7b355fca167fa5302c77bccdfa0af4d7abc6bd8c"
"reference": "a18c3dd41cfcf011e3866802e39b9ae9e541deaf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mailer/zipball/7b355fca167fa5302c77bccdfa0af4d7abc6bd8c",
"reference": "7b355fca167fa5302c77bccdfa0af4d7abc6bd8c",
"url": "https://api.github.com/repos/symfony/mailer/zipball/a18c3dd41cfcf011e3866802e39b9ae9e541deaf",
"reference": "a18c3dd41cfcf011e3866802e39b9ae9e541deaf",
"shasum": "",
"mirrors": [
{
@ -6124,7 +6125,8 @@
"conflict": {
"symfony/http-kernel": "<5.4",
"symfony/messenger": "<6.2",
"symfony/mime": "<6.2"
"symfony/mime": "<6.2",
"symfony/twig-bridge": "<6.2.1"
},
"require-dev": {
"symfony/console": "^5.4|^6.0",
@ -6158,7 +6160,7 @@
"description": "Helps sending emails",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/mailer/tree/v6.2.0"
"source": "https://github.com/symfony/mailer/tree/v6.2.1"
},
"funding": [
{
@ -6174,7 +6176,7 @@
"type": "tidelift"
}
],
"time": "2022-11-28T17:18:31+00:00"
"time": "2022-12-06T16:54:23+00:00"
},
{
"name": "symfony/mime",
@ -7599,16 +7601,16 @@
},
{
"name": "symfony/translation-contracts",
"version": "v3.1.1",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation-contracts.git",
"reference": "606be0f48e05116baef052f7f3abdb345c8e02cc"
"reference": "68cce71402305a015f8c1589bfada1280dc64fe7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/606be0f48e05116baef052f7f3abdb345c8e02cc",
"reference": "606be0f48e05116baef052f7f3abdb345c8e02cc",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/68cce71402305a015f8c1589bfada1280dc64fe7",
"reference": "68cce71402305a015f8c1589bfada1280dc64fe7",
"shasum": "",
"mirrors": [
{
@ -7626,7 +7628,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.1-dev"
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -7666,7 +7668,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/translation-contracts/tree/v3.1.1"
"source": "https://github.com/symfony/translation-contracts/tree/v3.2.0"
},
"funding": [
{
@ -7682,7 +7684,7 @@
"type": "tidelift"
}
],
"time": "2022-06-27T17:24:16+00:00"
"time": "2022-11-25T10:21:52+00:00"
},
{
"name": "symfony/uid",
@ -7766,16 +7768,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v6.2.0",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "6228b11059d7b279be699682f164a107ba9a268d"
"reference": "1e7544c8698627b908657e5276854d52ab70087a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/6228b11059d7b279be699682f164a107ba9a268d",
"reference": "6228b11059d7b279be699682f164a107ba9a268d",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/1e7544c8698627b908657e5276854d52ab70087a",
"reference": "1e7544c8698627b908657e5276854d52ab70087a",
"shasum": "",
"mirrors": [
{
@ -7840,7 +7842,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v6.2.0"
"source": "https://github.com/symfony/var-dumper/tree/v6.2.1"
},
"funding": [
{
@ -7856,7 +7858,7 @@
"type": "tidelift"
}
],
"time": "2022-11-28T13:41:56+00:00"
"time": "2022-12-03T22:32:58+00:00"
},
{
"name": "symfony/yaml",
@ -8299,16 +8301,16 @@
},
{
"name": "yansongda/pay",
"version": "v3.2.9",
"version": "v3.2.10",
"source": {
"type": "git",
"url": "https://github.com/yansongda/pay.git",
"reference": "20c3ef48d71ff276a87bc6b38399d6585d1b82ce"
"reference": "c084d672732032b8b189aaa5c370b52bc06d3c95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yansongda/pay/zipball/20c3ef48d71ff276a87bc6b38399d6585d1b82ce",
"reference": "20c3ef48d71ff276a87bc6b38399d6585d1b82ce",
"url": "https://api.github.com/repos/yansongda/pay/zipball/c084d672732032b8b189aaa5c370b52bc06d3c95",
"reference": "c084d672732032b8b189aaa5c370b52bc06d3c95",
"shasum": "",
"mirrors": [
{
@ -8378,7 +8380,7 @@
"issues": "https://github.com/yansongda/pay/issues",
"source": "https://github.com/yansongda/pay"
},
"time": "2022-10-30T06:14:58+00:00"
"time": "2022-11-25T11:41:16+00:00"
},
{
"name": "yansongda/supports",
@ -9833,16 +9835,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.25",
"version": "9.5.26",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d"
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2",
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2",
"shasum": "",
"mirrors": [
{
@ -9921,7 +9923,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26"
},
"funding": [
{
@ -9937,7 +9939,7 @@
"type": "tidelift"
}
],
"time": "2022-09-25T03:44:45+00:00"
"time": "2022-10-28T06:00:21+00:00"
},
{
"name": "sebastian/cli-parser",

View File

@ -214,10 +214,10 @@
// 'ExampleClass' => App\Example\ExampleClass::class,
])->toArray(),
'instance_id' => env('INSTANCE_ID', null),
'instance_id' => env('INSTANCE_ID'),
'instance_type' => env('INSTANCE_TYPE', 'primary'),
'instance_address' => env('INSTANCE_address', null),
'instance_address' => env('INSTANCE_address'),
];

View File

@ -14,7 +14,7 @@ public function up()
{
Schema::table('users', function (Blueprint $table) {
//
$table->decimal('balances', 10, 2)->default(0)->after('password');
$table->decimal('balances', 10)->default(0)->after('password');
// drop column if exists
if (Schema::hasColumn('users', 'drops')) {

View File

@ -25,7 +25,7 @@ public function up()
$table->string('payment')->nullable()->index();
// amount
$table->decimal('amount', 10, 2)->default(0);
$table->decimal('amount', 10)->default(0);
// paid_at
$table->timestamp('paid_at')->nullable();

View File

@ -14,7 +14,7 @@ public function up()
{
Schema::table('balances', function (Blueprint $table) {
//
$table->decimal('remaining_amount', 10, 2)->default(0)->after('amount');
$table->decimal('remaining_amount', 10)->default(0)->after('amount');
});
}