@extends('layouts.admin') @section('title', '뷰티샵 관리') @section('content')

@yield('title')

등록
@slot('filters') {{-- --}} @endslot
@php $pcShops = isset($shops) && method_exists($shops, 'items') ? $shops->items() : []; @endphp @forelse($pcShops as $shop) @php $id = $shop->id; $name = $shop->name; $introduction = $shop->introduction; $address = trim(($shop->address1 ?? '') . ' ' . ($shop->address2 ?? '')); $centerName = $shop->center->name ?? '본사 직접 관리'; $owner = $shop->ceo_name; $status = $shop->operating_status; $pinned = $shop->is_pinned ?? false; $isMainDisplay = $shop->is_main_displayed ?? true; $createdAt = optional($shop->created_at)->format('Y-m-d'); $updatedAt = optional($shop->updated_at)->format('Y-m-d'); // N:M 피벗 슬롯 이미지 조회 (없으면 레거시 컬럼 fallback) $logoImage = method_exists($shop, 'getSlotImage') ? $shop->getSlotImage('logo') : null; // Thumb > WebP > AVIF > 원본 > null 순으로 검증된 최종 URL $displayThumbUrl = $logoImage?->preview_url; // 만약 피벗 이전 과거 단일 경로 컬럼(logo_path) 데이터가 남아있는 경우 Fallback if (!$displayThumbUrl && !empty($shop->logo_path)) { $displayThumbUrl = asset('storage/' . $shop->logo_path); } $defaultPlaceholder = 'https://placehold.co/120x120?text=No+Image'; @endphp @empty @endforelse
대표 이미지 뷰티샵 정보 소속 및 대표자 노출 설정 등록일자 및 상태 관리
{{ $name ?? ($shop->name ?? '이미지') }}
@if ($pinned ?? ($shop->is_pinned ?? false)) 상단고정 @endif
@if ($shop->categories && $shop->categories->isNotEmpty())
@foreach ($shop->categories as $cat) {{ $cat->parent ? $cat->parent->name . ' > ' : '' }}{{ $cat->name }} @endforeach
@endif @if ($introduction)
{{ $introduction }}
@endif @if ($address)
{{ $address }}
@endif
{{ $centerName }}
대표: {{ $owner }}
is_pinned ? 'checked' : '' }}>
is_main_displayed ? 'checked' : '' }}>
정렬
{{ $createdAt }}
@if ($shop->updated_at && $shop->updated_at != $shop->created_at)
(수정: {{ $updatedAt }})
@endif
@if ($status === 'active') 영업중 (active) @elseif($status === 'temp_closed') 일시중지 (temp_closed) @elseif($status === 'suspended') 운영정지 (suspended) @else 폐점 (closed) @endif
등록된 뷰티샵이 없습니다.
@if (isset($shops) && method_exists($shops, 'hasPages') && $shops->hasPages())
{{ $shops->appends(request()->query())->links('vendor.pagination.admin') }}
@endif
@include('admin.shops.partials.list_items', ['shops' => $shops ?? null])
로딩 중...
추가 데이터를 불러오는 중입니다...
@endsection @push('scripts') @php $currentPageNum = 1; $lastPageNum = 1; if (isset($shops)) { if (method_exists($shops, 'currentPage')) { $currentPageNum = $shops->currentPage(); } if (method_exists($shops, 'lastPage')) { $lastPageNum = $shops->lastPage(); } } @endphp @endpush