feat: [boards] 게시판 API 시스템 구현
- BoardController, PostController 추가 - Board, BoardSetting 모델 수정 - BoardService 추가 - FormRequest 클래스 추가 - Swagger 문서 추가 (BoardApi, PostApi) - 게시판 시스템 필드 마이그레이션 추가
This commit is contained in:
27
app/Http/Requests/Boards/PostUpdateRequest.php
Normal file
27
app/Http/Requests/Boards/PostUpdateRequest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Boards;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PostUpdateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'title' => 'sometimes|string|max:200',
|
||||
'content' => 'sometimes|string',
|
||||
'editor_type' => 'sometimes|string|in:wysiwyg,markdown,text',
|
||||
'is_notice' => 'sometimes|boolean',
|
||||
'is_secret' => 'sometimes|boolean',
|
||||
'status' => 'sometimes|string|in:draft,published,hidden',
|
||||
'custom_fields' => 'nullable|array',
|
||||
'custom_fields.*' => 'nullable',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user