1 | <?php |
||
2 | |||
3 | namespace App; |
||
4 | |||
5 | use Illuminate\Database\Eloquent\Model; |
||
6 | |||
7 | class Role extends Model |
||
8 | { |
||
9 | protected $table = 'roles'; |
||
10 | |||
11 | protected $fillable = ['name', 'label']; |
||
12 | |||
13 | /** |
||
14 | * A role may be given various permissions. |
||
15 | * |
||
16 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
17 | */ |
||
18 | public function permissions() |
||
19 | { |
||
20 | return $this->belongsToMany(Permission::class); |
||
0 ignored issues
–
show
|
|||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Grant the given permission to a role. |
||
25 | * |
||
26 | * @param $query |
||
27 | * @param $userType |
||
28 | * @return mixed |
||
29 | */ |
||
30 | 1 | public function scopeGrantedRoles($query, $userType) |
|
31 | { |
||
32 | 1 | return $query->where('id', '>=', $userType); |
|
33 | } |
||
34 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths