|
|
|
@ -44,7 +44,7 @@ class CheckBirthday extends Command
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
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) {
|
|
|
|
foreach ($users as $user) {
|
|
|
|
Notification::send($user, new BirthdayNotify(['user_id' => $user->id]));
|
|
|
|
Notification::send($user, new BirthdayNotify(['user_id' => $user->id]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|