1 | <?php |
||
18 | class Role extends Resource implements HasAbilities |
||
19 | { |
||
20 | use Authorizable, |
||
21 | HasFieldName; |
||
22 | |||
23 | public static $permissionsForAbilities = [ |
||
24 | 'viewAny' => 'viewAny role', |
||
25 | 'view' => 'view role', |
||
26 | 'create' => 'create role', |
||
27 | 'update' => 'update role', |
||
28 | 'delete' => 'delete role', |
||
29 | ]; |
||
30 | |||
31 | public static $canSeeOverridePermissionCallback = null; |
||
32 | |||
33 | /** |
||
34 | * The model the resource corresponds to. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | public static $model; |
||
39 | |||
40 | public static function canSeeOverridePermmission($callback) |
||
44 | |||
45 | /** |
||
46 | * The single value that should be used to represent the resource when being displayed. |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | public static $title = 'name'; |
||
51 | |||
52 | /** |
||
53 | * Get the search result subtitle for the resource. |
||
54 | * |
||
55 | * @return string|null |
||
56 | */ |
||
57 | public function subtitle() |
||
61 | |||
62 | /** |
||
63 | * The columns that should be searched. |
||
64 | * |
||
65 | * @var array |
||
66 | */ |
||
67 | public static $search = [ |
||
68 | 'name', 'guard_name', |
||
69 | ]; |
||
70 | |||
71 | /** |
||
72 | * Get the displayable label of the resource. |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | public static function label() |
||
80 | |||
81 | /** |
||
82 | * Get the displayable singular label of the resource. |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | public static function singularLabel() |
||
90 | |||
91 | /** |
||
92 | * Get the fields displayed by the resource. |
||
93 | * |
||
94 | * @param \Illuminate\Http\Request $request |
||
95 | * @return array |
||
96 | */ |
||
97 | public function fields(Request $request) |
||
133 | } |
||
134 |