Download the PHP package scchethu/bs-wire-modal without Composer
On this page you can find all versions of the php package scchethu/bs-wire-modal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download scchethu/bs-wire-modal
More information about scchethu/bs-wire-modal
Files in scchethu/bs-wire-modal
Package bs-wire-modal
Short Description bootstrap 4 based livewire modal
License MIT
Informations about the package bs-wire-modal
About Boostrap 4 Wire Modal
Wire Elements Modal is a Livewire component inspired by wire-elements/modal
Installation
Click the image above to read a full article on using the Wire Elements modal package or follow the instructions below.
To get started, require the package via Composer:
Livewire directive
Add the Livewire directive @livewire('livewire-bs4-ui-modal')
directive to your template.
Alpine
Livewire Elements Modal requires Alpine. You can use the official CDN to quickly include Alpine:
BS4
The base modal is made with BS4. If you use a different CSS framework I recommend that you publish the modal template and change the markup to include the required classes for your CSS framework.
Creating a modal
You can run php artisan make:livewire EditUser
to make the initial Livewire component. Open your component class and make sure it extends the ModalComponent
class:
Opening a modal
To open a modal you will need to emit an event. To open the EditUser
modal for example:
Security
If you are new to Livewire I recommend to take a look at the security details. In short, it's very important to validate all information given Livewire stores this information on the client-side, or in other words, this data can be manipulated. Like shown in the examples above, use the Guard
facade to authorize actions.
License
Boostrap 4 Wire Modal is open-sourced software licensed under the MIT license.