Source: blog.deleu.dev

Laravel Report: Date Range
This is the third post on a Laravel Report series Part https://blog.deleu.dev/laravel-report-user-defined-sorting/.

On a single system, there's likely multiple date fields on multiple objects that could be important to provide filtering capabilities.

field, $fields)) { return false; } if (! $this->start || $this->end) { return false; } return true; } public function field(): string { return $this->field; } public function start(): string { return $this->start->startOfDay()->format('Y-m-d H:i:s'); } public function end(): string { return $this->end->endOfDay()->format('Y-m-d H:i:s'); }}

This post closes a simplified version of reporting components that can make the reporting capabilities on your Laravel application extremely powerful.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners