HasToasts
trait HasToasts
Trait HasToasts.
Provides a fluent interface for dispatching toast notifications from Livewire components.
Properties
| protected object|null | $_beartropy_toast_proxy | ||
| protected | $component |
Methods
object
toast()
Get the toast proxy instance.
__construct($component)
No description
success(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send a success toast.
error(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send an error toast.
info(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send an info toast.
warning(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send a warning toast.
send($type, $title, $message, $duration, $position)
No description
Details
at line 24
object
toast()
Get the toast proxy instance.
Allows usage like $this->toast()->success('Message').
at line 29
__construct($component)
No description
at line 41
success(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send a success toast.
at line 53
error(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send an error toast.
at line 65
info(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send an info toast.
at line 77
warning(string $title, string $message = '', int $duration = 4000, string|null $position = null)
Send a warning toast.
at line 82
protected
send($type, $title, $message, $duration, $position)
No description