| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class TestimonialStoreRequest extends FormRequest |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Determine if the user is authorized to make this request. |
||
| 11 | * |
||
| 12 | * @return bool |
||
| 13 | */ |
||
| 14 | public function authorize() |
||
| 15 | { |
||
| 16 | return true; |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Get the validation rules that apply to the request. |
||
| 21 | * |
||
| 22 | * @return array |
||
| 23 | */ |
||
| 24 | public function rules() |
||
| 25 | { |
||
| 26 | return [ |
||
| 27 | 'feedback' => ['required', 'string'], |
||
| 28 | 'name' => ['required', 'string', 'max:255'], |
||
| 29 | 'surname' => ['required', 'string', 'max:255'], |
||
| 30 | 'profession' => ['required', 'string', 'max:255'], |
||
| 31 | 'country_id' => ['required', 'string'], |
||
| 32 | 'photo' => 'mimes:jpg,jpeg,png|max:5120', // 5MB |
||
| 33 | 'personal_data_agreement' => ['required'], |
||
| 34 | 'publish_agreement' => ['required'], |
||
| 35 | ]; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function messages() |
||
| 43 | ]; |
||
| 44 | } |
||
| 45 | } |
||
| 53 |