Completed
Pull Request — master (#530)
by Chris
01:21
created

ClearCache::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 9.4285
1
<?php
2
3
namespace Spatie\Permission\Commands;
4
5
use Illuminate\Console\Command;
6
use Spatie\Permission\Traits\HasPermissions;
7
8
class ClearCache extends Command
9
{
10
    use HasPermissions;
11
12
    protected $signature = 'permission:clear-cache';
13
14
15
    protected $description = 'Clear permissions cache';
16
17
    public function handle()
18
    {
19
        $this->forgetCachedPermissions();
20
        $this->info('Permissions cache was cleared');
21
    }
22
}
23