移除 冗余

This commit is contained in:
iVampireSP.com 2023-01-13 22:16:48 +08:00
parent 0ad8e5118d
commit a0bd776aa6
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
5 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ public function __construct(User|int $user, $event, array|Model $data)
// if user is int
if (is_int($user)) {
$user = User::find($user);
$user = (new User)->find($user);
}
$this->user = $user;

View File

@ -142,7 +142,7 @@ public function safeDelete(): bool
return true;
}
public function routeNotificationForMail(WorkOrderNotification $work_order): array
public function routeNotificationForMail(): array
{
$user = $this->user;

View File

@ -29,7 +29,7 @@ public function send(mixed $notifiable, Notification $notification): void
$user_id = $notifiable->user_id ?? $notifiable->id;
$user = User::find($user_id);
$user = (new User)->find($user_id);
broadcast(new Users($user, $data['event'], $data));
}

View File

@ -25,11 +25,10 @@ public function __construct()
/**
* Get the notification's delivery channels.
*
* @param Balance $notifiable
*
* @return array
*/
public function via(Balance $notifiable): array
public function via(): array
{
return [WeComChannel::class];
}

View File

@ -26,6 +26,7 @@ public function __construct(array|Model $message, string $event)
}
$this->message = $message;
$this->event = $event;
}
/**