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.