auth check

This commit is contained in:
Benjamin Takats
2023-01-19 19:02:17 +01:00
parent b4620fa894
commit 022924e20f

View File

@@ -13,16 +13,18 @@ class LaravelEcho extends Component
public function plebLoggedIn($data)
{
$this->notification()
->confirm([
'img' => $data['img'],
'title' => 'Pleb alert!',
'description' => $data['name'].' logged in',
'icon' => 'bell',
'acceptLabel' => '',
'rejectLabel' => '',
'iconColor' => 'primary',
'timeout' => 60000,
]);
if (auth()->check()) {
$this->notification()
->confirm([
'img' => $data['img'],
'title' => 'Pleb alert!',
'description' => $data['name'].' logged in',
'icon' => 'bell',
'acceptLabel' => '',
'rejectLabel' => '',
'iconColor' => 'primary',
'timeout' => 60000,
]);
}
}
}