Test Failed
Push — master ( 20d9e4...ed42d0 )
by Burak
05:25
created

JetstreamServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace App\Providers;
4
5
use App\Actions\Jetstream\DeleteUser;
6
use Illuminate\Support\ServiceProvider;
7
use Laravel\Jetstream\Jetstream;
8
9
class JetstreamServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register any application services.
13
     *
14
     * @return void
15
     */
16
    public function register()
17
    {
18
        //
19
    }
20
21
    /**
22
     * Bootstrap any application services.
23
     *
24
     * @return void
25
     */
26
    public function boot()
27
    {
28
        $this->configurePermissions();
29
30
        Jetstream::deleteUsersUsing(DeleteUser::class);
31
    }
32
33
    /**
34
     * Configure the permissions that are available within the application.
35
     *
36
     * @return void
37
     */
38
    protected function configurePermissions()
39
    {
40
        Jetstream::defaultApiTokenPermissions(['read']);
41
42
        Jetstream::permissions([
43
            'create',
44
            'read',
45
            'update',
46
            'delete',
47
        ]);
48
    }
49
}
50