| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ModuleCreateRequest extends FormRequest |
||
| 10 | { |
||
| 11 | use TranslatableCommand; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Determine if the user is authorized to make this request. |
||
| 15 | * |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | public function authorize() |
||
| 19 | { |
||
| 20 | return Auth::guard('chief')->user(); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Get the validation rules that apply to the request. |
||
| 25 | * @return array |
||
| 26 | */ |
||
| 27 | public function rules() |
||
| 28 | { |
||
| 29 | return [ |
||
| 30 | 'module_key' => 'required', |
||
| 31 | 'slug' => 'required|unique:modules,slug', |
||
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function attributes() |
||
| 36 | { |
||
| 37 | return [ |
||
| 38 | 'module_key' => 'type', |
||
| 39 | 'slug' => 'interne link', |
||
| 40 | ]; |
||
| 43 |