diff --git a/app/Notifications/UserBalanceNotification.php b/app/Notifications/UserBalanceNotification.php index 44f9f2a..795a117 100644 --- a/app/Notifications/UserBalanceNotification.php +++ b/app/Notifications/UserBalanceNotification.php @@ -31,10 +31,10 @@ public function __construct() * * @return array */ - public function via($notifiable) - { - return [WeComRobotChannel::class]; - } + // public function via($notifiable) + // { + // // return [WeComRobotChannel::class]; + // } public function toGroup($notifiable) { @@ -50,7 +50,7 @@ public function toGroup($notifiable) $data = [ - 'balances' => $notifiable, + 'balance' => $notifiable, 'user' => $user, ]; diff --git a/resources/views/notifications/user/balance.blade.php b/resources/views/notifications/user/balance.blade.php index aa48843..101a390 100644 --- a/resources/views/notifications/user/balance.blade.php +++ b/resources/views/notifications/user/balance.blade.php @@ -1,3 +1,3 @@ -@if ($balances->paid_at !== null) - {{ $user->name }} 在 {{ $balance->paid_at->toDateTimeString() }} 充值了 {{ $balances->amount }} 元。 +@if ($balance->paid_at !== null) + {{ $user->name }} 在 {{ $balance->paid_at->toDateTimeString() }} 充值了 {{ $balance->amount }} 元。 @endif