修复 bug
This commit is contained in:
parent
a0bd776aa6
commit
3a7272834a
@ -29,7 +29,7 @@ class Users extends Event implements ShouldBroadcastNow
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(User|int $user, $event, array|Model $data)
|
||||
public function __construct(User|int $user, string $event, array|Model $data)
|
||||
{
|
||||
// init vars
|
||||
$this->sent_at = Carbon::now();
|
||||
|
@ -12,21 +12,18 @@ class WebNotification extends Notification
|
||||
use Queueable;
|
||||
|
||||
public array|Model $message = [];
|
||||
public string $event = 'notification';
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(array|Model $message, string $event)
|
||||
public function __construct(array|Model $message)
|
||||
{
|
||||
if ($message instanceof Model) {
|
||||
$message = $message->toArray();
|
||||
}
|
||||
|
||||
$this->message = $message;
|
||||
$this->event = $event;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user