| 1 | <?php |
||
| 12 | class SyncPermissionOnRoleRequest extends Request |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Define which Roles and/or Permissions has access to this request.. |
||
| 17 | * |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $access = [ |
||
| 21 | 'roles' => 'admin', |
||
| 22 | 'permissions' => '', |
||
| 23 | ]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Id's that needs decoding before applying the validation rules. |
||
| 27 | * |
||
| 28 | * @var array |
||
| 29 | */ |
||
| 30 | protected $decode = [ |
||
| 31 | 'permissions_ids', |
||
| 32 | 'role_id', |
||
| 33 | ]; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Defining the URL parameters (`/stores/999/items`) allows applying |
||
| 37 | * validation rules on them and allows accessing them like request data. |
||
| 38 | * |
||
| 39 | * @var array |
||
| 40 | */ |
||
| 41 | protected $urlParameters = [ |
||
| 42 | |||
| 43 | ]; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | public function rules() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return bool |
||
| 59 | */ |
||
| 60 | public function authorize() |
||
| 64 | } |
||
| 65 |