Allow to pass single user to send notifications at hook
This commit is contained in:
parent
cd9fa0b3d3
commit
3481dc75fc
|
|
@ -9,6 +9,7 @@ use Closure;
|
||||||
use App\Events;
|
use App\Events;
|
||||||
use Notification;
|
use Notification;
|
||||||
use App\Notifications;
|
use App\Notifications;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class Hook
|
class Hook
|
||||||
|
|
@ -131,7 +132,7 @@ class Hook
|
||||||
|
|
||||||
public static function sendNotification($users, string $title, $content = ''): void
|
public static function sendNotification($users, string $title, $content = ''): void
|
||||||
{
|
{
|
||||||
Notification::send($users, new Notifications\SiteMessage($title, $content));
|
Notification::send(Arr::wrap($users), new Notifications\SiteMessage($title, $content));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function pushMiddleware($middleware)
|
public static function pushMiddleware($middleware)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user