1 | <?php |
||||
2 | |||||
3 | namespace Insenseanalytics\LaravelNovaPermission; |
||||
4 | |||||
5 | use Laravel\Nova\Resource; |
||||
0 ignored issues
–
show
|
|||||
6 | use Spatie\Permission\Models\Role as SpatieRole; |
||||
7 | |||||
8 | class Role extends Resource |
||||
9 | { |
||||
10 | use RoleResourceTrait; |
||||
11 | |||||
12 | /** |
||||
13 | * The model the resource corresponds to. |
||||
14 | * |
||||
15 | * @var string |
||||
16 | */ |
||||
17 | public static $model = SpatieRole::class; |
||||
18 | |||||
19 | /** |
||||
20 | * The single value that should be used to represent the resource when being displayed. |
||||
21 | * |
||||
22 | * @var string |
||||
23 | */ |
||||
24 | public static $title = 'name'; |
||||
25 | |||||
26 | /** |
||||
27 | * The columns that should be searched. |
||||
28 | * |
||||
29 | * @var array |
||||
30 | */ |
||||
31 | public static $search = [ |
||||
32 | 'name', |
||||
33 | ]; |
||||
34 | |||||
35 | /** |
||||
36 | * Indicates if the resource should be displayed in the sidebar. |
||||
37 | * |
||||
38 | * @var bool |
||||
39 | */ |
||||
40 | public static $displayInNavigation = false; |
||||
41 | |||||
42 | /** |
||||
43 | * Get the displayable label of the resource. |
||||
44 | * |
||||
45 | * @return string |
||||
46 | */ |
||||
47 | public static function label() |
||||
48 | { |
||||
49 | return __('laravel-nova-permission::resources.Roles'); |
||||
0 ignored issues
–
show
The function
__ was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
50 | } |
||||
51 | |||||
52 | /** |
||||
53 | * Get the displayable singular label of the resource. |
||||
54 | * |
||||
55 | * @return string |
||||
56 | */ |
||||
57 | public static function singularLabel() |
||||
58 | { |
||||
59 | return __('laravel-nova-permission::resources.Role'); |
||||
0 ignored issues
–
show
The function
__ was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
60 | } |
||||
61 | } |
||||
62 |
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