feat(boards): 게시글 파일 시스템 개선 및 이미지 미리보기 추가
- Morph map에 Post, Department 모델 등록 (ClassMorphViolationException 해결) - 파일 저장 방식을 API 스타일로 변경 (document_id + document_type) - 파일 미리보기 라우트 및 메서드 추가 (previewFile) - 게시글 상세 페이지에서 이미지 첨부파일을 본문 상단에 풀 너비로 표시 - 비이미지 첨부파일은 하단에 다운로드 목록으로 분리 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\Boards\Post;
|
||||
use App\Models\Tenants\Department;
|
||||
use App\Models\User;
|
||||
use App\Services\SidebarMenuService;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
@@ -24,9 +26,11 @@ public function register(): void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Morph Map: mng/api 프로젝트 간 User 모델 경로 통일
|
||||
// Morph Map: Polymorphic 관계 모델 등록
|
||||
Relation::enforceMorphMap([
|
||||
'user' => User::class,
|
||||
'post' => Post::class,
|
||||
'department' => Department::class,
|
||||
]);
|
||||
|
||||
// 사이드바에 메뉴 데이터 전달
|
||||
|
||||
Reference in New Issue
Block a user