fix : 컨트롤러 검증 → FormRequest 분리
This commit is contained in:
25
app/Http/Requests/Design/Model/UpdateRequest.php
Normal file
25
app/Http/Requests/Design/Model/UpdateRequest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Design\Model;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'code' => 'sometimes|string|max:100',
|
||||
'name' => 'sometimes|string|max:200',
|
||||
'category_id' => 'nullable|integer',
|
||||
'lifecycle' => 'nullable|string|max:50',
|
||||
'description' => 'nullable|string',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user