mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
pleb alert!
This commit is contained in:
24
app/Http/Livewire/LaravelEcho.php
Normal file
24
app/Http/Livewire/LaravelEcho.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
use WireUi\Traits\Actions;
|
||||
|
||||
class LaravelEcho extends Component
|
||||
{
|
||||
use Actions;
|
||||
|
||||
protected $listeners = ['echo:login,.App\Events\PlebLoggedInEvent' => 'plebLoggedIn'];
|
||||
|
||||
public function plebLoggedIn($data)
|
||||
{
|
||||
$this->notification()
|
||||
->success(title: 'Pleb alert!', description: $data['name'].' logged in');
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.laravel-echo');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user