/modal-app

wire-element tutorial app

Primary LanguagePHPMIT LicenseMIT

Modal app

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.

image

Files

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

Local installation

Requirements

This is a Laravel 9 project. The requirements are the same as a new Laravel 9 project with Livewire and wire-elements/modal

Recommended:

Clone

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

Install all the dependencies using composer

cd modal-app
composer install

Create .env

Create an .env file from .env.example

cp .env.example .env

Generate APP_KEY

Generate an APP_KEY using the artisan command

php artisan key:generate

Configure Laravel

There is no need to configure a database.

Contributing

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.

Credits

License

MIT License (MIT). Please see License File for more information.