Back

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

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

/ 1000