startDate = $startDate; $this->endDate = $endDate; } public function collection() { return Booking::whereBetween('created_at', [$this->startDate, $this->endDate]) ->select('created_at', 'name', 'category', 'service_name', 'total') ->get(); } public function headings(): array { return ['Date', 'User', 'Category', 'Service', 'Price']; } }