Download the PHP package mergesoft/arg-calendar without Composer
On this page you can find all versions of the php package mergesoft/arg-calendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mergesoft/arg-calendar
More information about mergesoft/arg-calendar
Files in mergesoft/arg-calendar
Package arg-calendar
Short Description laravel calendar ui
License MIT
Homepage https://github.com/mergehez/arg-laravel-calendar
Informations about the package arg-calendar
ArgCalendar for Laravel
... with Alpine Js and Bootstrap 5
Installation & Configuration
-
Install the package via composer. (The package will automatically register its service provider.)
-
Publish config file and configure your calendar. (output: config/arg-calendar.php)
- Publish translation file. (output: resources/lang/\<lang-code>/arg-calendar.php)
The command below publishes english translations. You can replace 'en' with another language code. But first check translation files folder for other available languages. If the language you are looking for does not exist there, then you can simply copy a random file to requested language's folder and modify translations. (It'd make me really happy, if you make a pull request with the new translation or send it to me via email)
Usage
Add bootstrap 5 and alpine js to the head tag:
... and with the following definition, you get a wonderful calendar ui :)
Booking Model
Property | Type |
---|---|
year | int |
month | int |
day | int |
ranges | array of bools |
Important: The length of ranges array depends on the "options" in the configuration. If there are 4 distinct hours in there, then the length must be 3. Assume 'options' is set like this:
There are 4 different hours here : 8-13-18-24
This means that there are 3 ranges: 8-13, 13-18 and 18-24
The ranges array has to be like [true, false, true] (you can use 0 and 1 as well)