mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
ALPHA 3.0.3
This commit is contained in:
@@ -54,4 +54,24 @@ class Schedule extends Model
|
||||
|
||||
return $dispo_item;
|
||||
}
|
||||
|
||||
public function getUserToNotify($priority = 0)
|
||||
{
|
||||
$users = \App\User::all();
|
||||
|
||||
if($priority == 0)
|
||||
{
|
||||
$userToNotify = collect();
|
||||
foreach ($users as $user) {
|
||||
if ($user->getPerm('schedule_notify')) {
|
||||
$userToNotify->push($user);
|
||||
}
|
||||
}
|
||||
|
||||
return $userToNotify;
|
||||
} else if ($priority == 1)
|
||||
{
|
||||
return $users;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user