feat:material
This commit is contained in:
33
app/Request/Api/MaterialRequest.php
Normal file
33
app/Request/Api/MaterialRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Request\Api;
|
||||
|
||||
use Hyperf\Validation\Request\FormRequest;
|
||||
|
||||
class MaterialRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'limit' => 'required|integer',
|
||||
'query_name' =>'sometimes|string',
|
||||
];
|
||||
}
|
||||
|
||||
protected array $scenes = [
|
||||
'material_list' => ['limit','query_name'],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user