Files
sam-manage/app/Http/Controllers/Api/Admin/CustomerCenterController.php
kent b992886fca feat(mng): 고객센터 게시판 목록 페이지 추가
- /customer-center 라우트 신규 생성
- 활성화된 시스템 게시판만 표시
- 테이블 컬럼: ID, 유형, 코드, 게시판명, 게시글 수, 생성일
- 관리 기능(구분, 필드, 상태, 액션) 제외한 읽기 전용 뷰

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 20:50:58 +09:00

27 lines
750 B
PHP

<?php
namespace App\Http\Controllers\Api\Admin;
use App\Http\Controllers\Controller;
use App\Models\Boards\Board;
use Illuminate\Http\Request;
use Illuminate\View\View;
class CustomerCenterController extends Controller
{
/**
* 고객센터 게시판 목록 (활성화된 시스템 게시판만 + 게시글 수)
*/
public function index(Request $request): View
{
$boards = Board::query()
->whereNull('tenant_id') // 시스템 게시판만
->where('is_active', true) // 활성화된 것만
->withCount('posts') // 게시글 수
->orderBy('created_at', 'desc')
->paginate(15);
return view('customer-center.partials.table', compact('boards'));
}
}