1 | <?php |
||
12 | class AuthorizedController extends AuthenticatedController |
||
13 | { |
||
14 | use AuthorizesRequests; |
||
15 | |||
16 | /** |
||
17 | * The resource Ability Map. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $resourceAbilityMap = [ |
||
22 | 'activities' => 'audit', |
||
23 | 'index' => 'list', |
||
24 | 'logs' => 'audit', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * The resource methods without models. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $resourceMethodsWithoutModels = []; |
||
33 | |||
34 | /** |
||
35 | * Resource action whitelist. |
||
36 | * Array of resource actions to skip mapping to abilities automatically. |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $resourceActionWhitelist = []; |
||
41 | |||
42 | /** |
||
43 | * Create a new authorized controller instance. |
||
44 | * |
||
45 | * @throws \Illuminate\Auth\Access\AuthorizationException |
||
46 | */ |
||
47 | public function __construct() |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function authorizeResource($model, $parameter = null, array $options = [], $request = null): void |
||
80 | |||
81 | /** |
||
82 | * Map resource actions to resource abilities. |
||
83 | * |
||
84 | * @return array |
||
85 | */ |
||
86 | protected function mapResourceAbilities(): array |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | protected function resourceAbilityMap(): array |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | protected function resourceMethodsWithoutModels() |
||
124 | } |
||
125 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.