3 changed files with 73 additions and 6 deletions
-
13app/Controller/v3/HorsemanController.php
-
33app/Request/v3/EmployeesRequest.php
-
33app/Request/v3/HorsemanOrderRequest.php
@ -0,0 +1,33 @@ |
|||||
|
<?php |
||||
|
|
||||
|
|
||||
|
namespace App\Request\v3; |
||||
|
use App\Request\BaseFormRequest; |
||||
|
|
||||
|
class EmployeesRequest extends BaseFormRequest |
||||
|
{ |
||||
|
/** |
||||
|
* Get the validation rules that apply to the request. |
||||
|
*/ |
||||
|
public function rules(): array |
||||
|
{ |
||||
|
return [ |
||||
|
'employees_id' => 'required|nonempty|integer', |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function messages(): array |
||||
|
{ |
||||
|
return [ |
||||
|
'*.*' => ':attribute无效', |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
public function attributes(): array |
||||
|
{ |
||||
|
return parent::attributes(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
<?php |
||||
|
|
||||
|
|
||||
|
namespace App\Request\v3; |
||||
|
use App\Request\BaseFormRequest; |
||||
|
|
||||
|
class HorsemanOrderRequest extends BaseFormRequest |
||||
|
{ |
||||
|
/** |
||||
|
* Get the validation rules that apply to the request. |
||||
|
*/ |
||||
|
public function rules(): array |
||||
|
{ |
||||
|
return [ |
||||
|
'global_order_id' => 'required|nonempty|integer', |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function messages(): array |
||||
|
{ |
||||
|
return [ |
||||
|
'*.*' => ':attribute无效', |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
public function attributes(): array |
||||
|
{ |
||||
|
return parent::attributes(); |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue