I needed a booking page for consultation calls on a few Laravel sites. Calendly would do the job, but I wanted the widget on my own domain, in my own design, and without sending visitors to another service. The self-hosted options I found are full applications with their own database, admin panel and deployment. I only wanted a package.
So I wrote laravel-booking: a self-hosted booking widget for Laravel (PHP 8.0+, Laravel 9 to 13), MIT licensed.
Install
composer require zapol/laravel-booking php artisan vendor:publish --tag=booking-config Then put the widget on any page, Blade or plain HTML:
<div id="booking-widget"></div> <script src="https://your-app.tld/booking/widget.js" data-event-type="consultation" defer></script> Add your calendar credentials before the first booking. The README has a quick start for each provider.
How availability works
You describe your weekly windows in the config file. The package reads the busy time from your real calendar and offers only the slots that are left. It supports buffers between meetings, a minimum notice and a maximum advance, and several windows per weekday.
Calendars it reads and writes:
- Google Calendar
- Microsoft 365 / Outlook
- any CalDAV server (iCloud, Nextcloud, Fastmail, Radicale)
Meeting links come from Google Meet, Microsoft Teams or Zoom, or you set a static location such as an office address or a phone number.
No database table
This is the part I like most. The links for rescheduling and cancelling are HMAC-signed, so the package does not need its own table. The booking lives in your calendar, where you would look for it anyway. If you want bookings in your database, there is an optional table and events your app can listen to.
What the visitor gets
- a date and time picker that follows your availability
- a confirmation email with an .ics attachment, in English or Polish
- reschedule and cancel links
- form fields you can pre-fill and lock from data attributes, which helps in multi-step funnels
You can also get a Slack message on every booking.
When it is the wrong tool
It is config-driven and has no admin panel. If people who do not touch code need to manage event types, or you want a hosted product with a team behind it, use Calendly or a full application like Cal.diy or Easy!Appointments. The README has a comparison table.
Links
- Code: https://github.com/PiotrZapolski/laravel-booking
- Packagist: https://packagist.org/packages/zapol/laravel-booking
- Live demo: https://piotrzapolski.com/laravel-booking/demo/
Issues and pull requests are welcome, especially new calendar providers.