We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee7705d commit 20ef8caCopy full SHA for 20ef8ca
app/Http/Livewire/Discussions/Comment.php
@@ -6,6 +6,7 @@
6
use App\Models\Reply;
7
use Filament\Notifications\Notification;
8
use Illuminate\Contracts\View\View;
9
+use Illuminate\Support\Facades\Auth;
10
use Livewire\Component;
11
12
class Comment extends Component
@@ -29,6 +30,16 @@ public function delete(): void
29
30
31
public function toggleLike(): void
32
{
33
+ if (! Auth::check()) {
34
+ Notification::make()
35
+ ->title(__('Vous devez être connecté pour liker un commentaire.'))
36
+ ->danger()
37
+ ->duration(5000)
38
+ ->send();
39
+
40
+ return;
41
+ }
42
43
LikeReply::run(auth()->user(), $this->comment);
44
45
$this->emitSelf('reloadComment');
0 commit comments