luanardev/livewire-alert

Laravel Livewire Alert.

v1.1.0 2023-02-11 15:13 UTC

This package is auto-updated.

Last update: 2024-11-11 19:30:50 UTC


README

This package allows you to dynamically show your Laravel Livewire Alert.

Documentation

Installation

Require the package:

composer require luanardev/livewire-alert

Publish Javascripts

php artisan vendor:publish --tag=livewire-alert:scripts

Add the livewire alert assets to your app layout view:

@livewireAlertStyles
@livewireAlertScripts

<script src="{{ asset('js/app.js') }}"></script>

Usage

Show an alert by calling either toastr or alert method in any livewire component:

toastr($message, $type)
alert($message, $type)