Building a Scheduling Automation app aims to streamline the process of setting up appointments and managing calendar effortlessly.
HTMX date picker
Provides a seamless and intuitive user experience when selecting dates for appointments
Anonymous function
The function efficiently retrieves the available dates, significantly simplifies the process of finding available dates.
public static function dateChecker($date) {
$date = new Carbon($date, config('app.timezone_display'));
$isUnavailableOrDayOff = function ($date) use ($bookedDates) {
return in_array($date->format('Y-m-d'), $bookedDates) || $date->dayOfWeek == Carbon::SUNDAY;
};
while ($isUnavailableOrDayOff($date)) {
$date->addDay();
}
return $date;
}
Google Calendar API
The Spatie's Google Calendar API package makes it easy to interact with it's functionalities, such as creating events and generating Google Meet link.
Built in PHP and Carbon
Created a custom service class to build the calendar and utilized Carbon as a date/time management for flexibility and precision.
This created a powerful and versatile calendar with a smooth user experience.