Passed
Push — dev6 ( 547e26...d08fa1 )
by Ron
21:59
created

TechTipPolicy::restore()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 0
c 2
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace App\Policies;
4
5
use App\Models\TechTip;
6
use App\Models\User;
7
use App\Traits\AllowTrait;
8
use Illuminate\Auth\Access\HandlesAuthorization;
9
10
class TechTipPolicy
11
{
12
    use HandlesAuthorization;
13
    use AllowTrait;
14
15
    public function manage(User $user)
16
    {
17
        return $this->checkPermission($user, 'Manage Tech Tips');
18
    }
19
20
    /**
21
     * Determine whether the user can create models
22
     */
23
    public function create(User $user)
24
    {
25
        return $this->checkPermission($user, 'Add Tech Tip');
26
    }
27
28
    /**
29
     * Determine whether the user can update the model
30
     */
31
    public function update(User $user)
32
    {
33
        return $this->checkPermission($user, 'Edit Tech Tip');
34
    }
35
36
    /**
37
     * Determine whether the user can delete the model
38
     */
39
    public function delete(User $user)
40
    {
41
        return $this->checkPermission($user, 'Delete Tech Tip');
42
    }
43
}
44