@extends('layouts.admin') @section('title', '프로그램 관리') @section('content')

@yield('title')

등록
총 {{ isset($programs) && method_exists($programs, 'total') ? $programs->total() : 12 }}건의 프로그램
@php $pcPrograms = isset($programs) && method_exists($programs, 'items') ? $programs->items() : []; @endphp @forelse($pcPrograms as $program) @php $id = $program->id; $name = $program->name; $code = $program->code; $intro = $program->introduction; $price = number_format($program->sale_price); $originalPrice = number_format($program->original_price); $execType = $program->execution_type; $pinned = $program->is_pinned ?? false; $isMain = $program->is_main_displayed ?? false; $isActive = $program->is_active ?? true; $createdAt = optional($program->created_at)->format('Y-m-d'); $updatedAt = optional($program->updated_at)->format('Y-m-d'); @endphp @empty @endforelse
대표 이미지 프로그램 정보 (명칭 / 코드) 실행 방식 (구분) 노출 설정 등록일자 및 상태 관리
@php // 1. 피벗 슬롯 이미지 조회 (program_logo 우선 -> 레거시 logo_path fallback) $logoImage = method_exists($program, 'getSlotImage') ? $program->getSlotImage('program_logo') : null; $displayThumbUrl = $logoImage?->preview_url; if (!$displayThumbUrl && !empty($program->logo_path)) { $displayThumbUrl = asset('storage/' . $program->logo_path); } $defaultPlaceholder = 'https://placehold.co/120x120?text=No+Image'; @endphp
{{ $program->name ?? '프로그램 이미지' }}
@if ($program->is_pinned ?? false) 상단고정 @endif
{{ $name }} {{ $code }}
@if($program->categories && $program->categories->isNotEmpty())
@foreach($program->categories as $cat) {{ $cat->parent ? ($cat->parent->parent ? $cat->parent->parent->name . ' > ' . $cat->parent->name . ' > ' : $cat->parent->name . ' > ') : '' }}{{ $cat->name }} @endforeach
@endif @if($intro)
{{ $intro }}
@endif
@if($program->discount_price > 0) {{ $originalPrice }}원 @endif {{ $price }}원 ({{ $program->session_count }}회차 / 유효 {{ $program->validity_days }}일)
@if($execType === 'single') 기본 프로그램 @elseif($execType === 'package_single') 베이직 패키지 @elseif($execType === 'package_separate') 스페셜 패키지 @endif
is_pinned ? 'checked' : '' }}>
is_main_displayed ? 'checked' : '' }}>
정렬
{{ $createdAt }}
@if($program->updated_at && $program->updated_at != $program->created_at)
(수정: {{ $updatedAt }})
@endif
수정
@csrf @method('DELETE')
등록된 프로그램이 없습니다.
@if(isset($programs) && method_exists($programs, 'hasPages') && $programs->hasPages())
{{ $programs->appends(request()->query())->links('vendor.pagination.admin') }}
@endif
@include('admin.programs.partials.list_items', ['programs' => $programs ?? null])
로딩 중...
추가 데이터를 불러오는 중입니다...
@endsection @push('scripts') @php $currentPageNum = 1; $lastPageNum = 1; if (isset($programs)) { if (method_exists($programs, 'currentPage')) { $currentPageNum = $programs->currentPage(); } if (method_exists($programs, 'lastPage')) { $lastPageNum = $programs->lastPage(); } } @endphp @endpush