This is a project to look at calendars using Laravel Livewire, two are being investigated:
This is a Laravel 8 side project to experiment with Livewire 2 calendar options.
This is a Laravel 8 project with Livewire 2 and Tailwind installed. The installation is similar to a new Laravel project.
Recommended:
See Cloning a repository for details on how to create a local copy of this project on your computer.
e.g.
git clone git@github.com:Pen-y-Fan/calendar.git
Install all the dependencies using composer
cd calendar
composer install
npm install
npm run dev
npm run watch
Create an .env
file from .env.example
composer post-root-package-install
php artisan key:generate
The Calendar demo uses an Event table, which can be seeded with Lorem Ipsum data from a MySQL database or Sqlite database.
For MySql, create a database on your MySql server and add the settings to the .env file:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=YourDatabaseName
DB_USERNAME=YourDatabaseUserName
DB_PASSWORD=YourDatabaseUserPassword
Alternatively create an empty sqlite database and configure Laravel to use Sqlite
touch database/database.sqlite
fsutil file createnew database/database.sqlite 0
Edit the .env file, add sqlite as the DB_CONNECTION and delete all the other DB_* keys.
DB_CONNECTION=sqlite
DB_HOST=127.0.0.1 }
DB_PORT=3306 }
DB_DATABASE=laravel } Delete
DB_USERNAME=root }
DB_PASSWORD= }
Run the following command to create the database, you choose in your .env
file and seed the tables with Lorem Ipsum
data:
php artisan migrate --seed
The phpunit.xml
file has been configured for Sqlite in memory testing. This requires the pdo_sqlite extension to be
enabled in your php.ini
. If there are any problems enabling the extension remove the following lines, PHPUnit will
then to use the database configured in your .env
file.
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
To make it easy to run all the PHPUnit tests a composer script has been created in composer.json. From the root of the
projects, use composer tests
composer tests
To run the Dusk tests:
php artisan dusk
To use the php web server, run the following artisan command:
php artisan serve
See the message under the serve command for the website name and port, by default it is:
The Calendar welcome page will display, navigate to:
- Livewire calendar asantibanez/livewire-calendar
- Full calendar for the Javascript / Livewire hybrid calendar Laravel Livewire Fullcalendar Integration Tutorial
Note: The events in the calendar share the same seed data, however the livewire calendar uses the date field and the full calendar uses the start field, so any updates to the date in one will not affect the other, the title is common to both.
This is a personal project. Contributions are not required. Anyone interested in developing this project are welcome to fork or clone for your own use.
MIT License (MIT). Please see License File for more information.