add notifications logic and add support of both JWT and Sanctum
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Notifications;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class NotificationRecipientService
|
||||
{
|
||||
public function getRecipients(string $targetGroup): array
|
||||
{
|
||||
$rows = User::getUsersByRole($targetGroup);
|
||||
return is_array($rows) ? $rows : [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user