mostafaamine
mostafaamine

Briere Mostafa Amine

@mostafaamine

9 Posts 21 Views

  • No matching results...
  • Searching...

/ 255

How each work in this situation? Why there is no parenthesis?

    public function handle(): void
{
User::where('email_verified_at', null)
->where('updated_at', '<', now()->subDay())
->whereDoesntHave('links', function (Builder $query): void {
$query->where('created_at', '<', now()->subDay());
})
->whereDoesntHave('questionsSent', function (Builder $query): void {
$query->where('created_at', '<', now()->subDay());
})
->whereDoesntHave('questionsReceived', function (Builder $query): void {
$query->where('created_at', '<', now()->subDay());
})
->get()
->each
->purge();
}

1

180