Test Failed
Push — master ( ed42d0...7405ac )
by Burak
04:45
created

DeleteNotificationsForm   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 14
ccs 0
cts 6
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A deleteAllNotifications() 0 7 1
1
<?php
2
3
namespace App\Http\Livewire\Data;
4
5
use App\Models\User;
6
use Illuminate\Support\Facades\Auth;
7
use Livewire\Component;
8
9
class DeleteNotificationsForm extends Component
10
{
11
    public function deleteAllNotifications()
12
    {
13
        /**
14
         * @var User $user
15
         */
16
        $user = Auth::user();
17
        $user->notifications()->delete();
18
    }
19
20
    public function render()
21
    {
22
        return view('livewire.data.delete-notifications-form');
23
    }
24
}
25