master
cody 6 months ago
parent cea3a14093
commit a62e8a9436

@ -44,7 +44,7 @@ class CheckBirthday extends Command
*/
public function handle()
{
$users = User::where('birthday', date('Y-m-d'))->get();
$users = User::where('is_schoolmate', 1)->where('birthday', date('Y-m-d'))->get();
foreach ($users as $user) {
Notification::send($user, new BirthdayNotify(['user_id' => $user->id]));
}

Loading…
Cancel
Save