| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class SkillRequest extends FormRequest |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Determine if the user is authorized to make this request. |
||
| 12 | * |
||
| 13 | * @return boolean |
||
| 14 | */ |
||
| 15 | public function authorize() |
||
| 16 | { |
||
| 17 | // only allow updates if the user is logged in |
||
| 18 | return \Auth::check(); |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Get the validation rules that apply to the request. |
||
| 23 | * |
||
| 24 | * @return []string |
||
| 25 | */ |
||
| 26 | public function rules() |
||
| 27 | { |
||
| 28 | return [ |
||
| 29 | 'name' => 'required|unique:skills', |
||
| 30 | 'description' => 'required' |
||
| 31 | ]; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get the validation attributes that apply to the request. |
||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function attributes() |
||
| 42 | // |
||
| 43 | ]; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get the validation messages that apply to the request. |
||
| 48 | * |
||
| 49 | * @return array |
||
| 50 | */ |
||
| 51 | public function messages() |
||
| 58 |