This project is based on How to build modals with Laravel and Livewire by Philo Hermans, this app demonstrates how to use wire-elements/modal to create a basic modal. How to open, close and pass parameters.
The following files form the basis of the tutorial, the components are heavily commented from the tutorial:
Modal:
- resources/views/vendor/livewire-ui-modal/modal.blade.php
Modal component:
- resources/views/components/modal.blade.php
Livewire:
- app/Http/Livewire/HelloWorld.php
- resources/views/livewire/hello-world.blade.php
- app/Http/Livewire/ChildModal.php
- resources/views/livewire/child-modal.blade.php
This is a Laravel 9 project. The requirements are the same as a new Laravel 9 project with Livewire and wire-elements/modal
Recommended:
See Cloning a repository for details on how to create a local copy of this project on your computer.
e.g.
clone git@github.com:Pen-y-Fan/modal-app.git
Install all the dependencies using composer
cd modal-app
composer install
Create an .env
file from .env.example
cp .env.example .env
Generate an APP_KEY using the artisan command
php artisan key:generate
There is no need to configure a database.
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.
- Michael Pritchard (AKA Pen-y-Fan).
- Philo Hermans - based on the blog How to build modals with Laravel and Livewire
MIT License (MIT). Please see License File for more information.