Skip to main content
Back to packages
1,213 GitHub stars

wire-elements/modal

View on GitHub

Description

Livewire component that provides you with a modal that supports multiple child modals while maintaining state.

Add the Livewire directive @livewire('wire-elements-modal') directive to your template.

<html>
<body>
<!-- content -->
 
@livewire('wire-elements-modal')
</body>
</html>

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:

<?php
 
namespace App\Http\Livewire;
 
use LivewireUI\Modal\ModalComponent;
 
class EditUser extends ModalComponent
{
public function render()
{
return view('livewire.edit-user');
}
}

Related Content on Laravel Daily

Video
Video

Recent Courses on Laravel Daily

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.