mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Migrate to HTMX (#114)
Dropped Livewire Added HTMX Added Blade code lint Drop Mysql and Redis Migrate to SQLite
This commit is contained in:
@ -2,14 +2,8 @@
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Toast
|
||||
{
|
||||
public function __construct(public Component $component)
|
||||
{
|
||||
}
|
||||
|
||||
public function success(string $message): void
|
||||
{
|
||||
$this->toast('success', $message);
|
||||
@ -32,6 +26,7 @@ public function info(string $message): void
|
||||
|
||||
private function toast(string $type, string $message): void
|
||||
{
|
||||
$this->component->dispatch('toast', type: $type, message: $message);
|
||||
session()->flash('toast.type', $type);
|
||||
session()->flash('toast.message', $message);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user