AuthServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\Policies\GatePolicy;
6
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
7
use Illuminate\Support\Facades\Gate;
8
9
class AuthServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * The policy mappings for the application.
13
     */
14
    protected $policies = [
15
        // 'App\Models\Model' => 'App\Policies\ModelPolicy',
16
    ];
17
18
    /**
19
     * Register any authentication / authorization services.
20
     */
21
    public function boot()
22
    {
23
        $this->registerPolicies();
24 906
25
        //  Gate to determine if the Administration link should show up on the navigation menu
26 906
        Gate::define('admin-link', [GatePolicy::class, 'adminLink']);
27 906
    }
28
}
29