File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types = 1 );
4
4
5
- use function Livewire\Volt\ {on };
6
5
use Illuminate\Support\Facades\ Auth ;
7
6
7
+ use function Livewire\Volt\ {on };
8
8
use function Livewire\Volt\ {state };
9
9
10
10
state ([' count' => Auth:: user ()-> unreadNotifications ()-> count ()]);
11
11
12
- on ([' NotificationMarkedAsRead' => function (int $count ) {
13
- return $count ;
14
- }]);
12
+ on ([' NotificationMarkedAsRead' => fn (int $count ) => $count );
15
13
16
14
? >
17
15
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types = 1 );
4
4
5
- use function Livewire\Volt\ {on };
6
5
use Illuminate\Support\Facades\ Auth ;
7
6
7
+ use function Livewire\Volt\ {on };
8
8
use function Livewire\Volt\ {state };
9
9
10
10
state ([' hasNotification' => Auth:: user ()-> unreadNotifications ()-> count () > 0 ]);
11
11
12
- on ([' NotificationMarkedAsRead' => function (int $count ) {
13
- return $count > 0 ;
14
- }]);
12
+ on ([' NotificationMarkedAsRead' => fn (int $count ) => $count > 0 ]);
15
13
16
14
? >
17
15
You can’t perform that action at this time.
0 commit comments