-
-
Notifications
You must be signed in to change notification settings - Fork 86
Notification trait
TinaH edited this page Jul 31, 2020
·
9 revisions
This package includes a Livewire notification trait that you can use in anywhere in your project. (Without making a form). By default the form component shows a Saved!
message next to the Save and stay
button on the form save()
method. The following instructions are for extended use in the rest of your project.
If you also want to show a notification when a form is saved OR if you want to show notifications anywhere in your project you have to add the included Laravel 7 blade component to your layout file and call the notify()
method in a livewire component. You can also call this method in AlpineJS.
<x-tall-notification />
Already applied to the form component
use Tanthammar\TallForms\Traits\Notify;
//call this in any method
$this->notify($color, $message);
Background colors are defined in the config file. See Config
Available options:
- positive
- negative
- info
- warning
-
null
Omitting the property uses thedefault
color from the config file.
- Installation
- Requirements
- v5 Upgrade Guide
- v6 Upgrade Guide
- v7 Upgrade Guide
- Support
- Quickstart
- Manual installation
- Optional
- Form component
- Field
- Field types
- Example Form
- Blade Components
- Notifications