Open sonali-webmavens opened 6 months ago
@ruchipatel-webmavens i checked holidays and its not working. try below code and it is showing error.
public function index()
{
$holidays = Holidays::for(India::make())->get();
// $data = $this->holidayService->getHolidays();
// // Extract holiday data
// $holidays = collect($data)->map(function ($holiday) {
// return [
// 'name' => $holiday['name'],
// 'date' => $holiday['date']['iso'],
// ];
// });
INFO($holidays);
return view('india', compact('holidays'));
}
Download the below package into the new Laravel project. https://github.com/spatie/holidays
create one file for india like this - https://github.com/spatie/holidays/blob/main/src/Countries/Turkey.php
Our holiday list you will find it in the below link. add rakhabandhan + bhai duj to all Gazetted Holidays from this page https://www.timeanddate.com/holidays/india/2024?hol=1
From year 1970 to 2037