26 lines
668 B
PHP
26 lines
668 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\ProductionOrder;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class ProductionOrderIndexRequest extends FormRequest
|
||
|
|
{
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'search' => 'nullable|string|max:100',
|
||
|
|
'production_status' => 'nullable|in:waiting,in_production,completed',
|
||
|
|
'sort_by' => 'nullable|in:created_at,delivery_date,order_no',
|
||
|
|
'sort_dir' => 'nullable|in:asc,desc',
|
||
|
|
'page' => 'nullable|integer|min:1',
|
||
|
|
'per_page' => 'nullable|integer|min:1|max:100',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|