@extends('admin.layouts.app') @php $isEdit = $product->exists; @endphp @section('title', $isEdit ? 'Ürün Düzenle' : 'Yeni Ürün') @section('page-title', $collection->getTranslation('name', 'tr')) @section('page-subtitle', $isEdit ? 'Ürün bilgileri ve görselleri' : 'Yeni ürün ekle') @section('content') @include('admin.partials.collection-tabs')
@csrf @if ($isEdit) @method('PUT') @endif

Çeviriler

@foreach ($languages as $language)
@endforeach

Ölçüler ve yayın

is_active ?? true) ? 'checked' : '' }}>

Kapak görseli

@include('admin.partials.media-upload', [ 'label' => 'Ürün kapağı', 'hint' => 'Ürün kartında ilk görünen fotoğraf.', 'name' => 'cover_image_upload', 'pathName' => 'cover_image', 'current' => old('cover_image', $product->cover_image), ])

Ürün galerisi

Her görsel için kutuya tıklayıp dosya seçin.

@php $images = old('images', $isEdit ? $product->images->map(fn ($img) => ['path' => $img->path, 'sort_order' => $img->sort_order])->all() : []); @endphp @foreach ($images as $index => $image)
@include('admin.partials.media-upload', [ 'label' => 'Ürün görseli', 'hint' => '', 'name' => "images[$index][upload]", 'pathName' => "images[$index][path]", 'current' => $image['path'] ?? '', ])
@endforeach
@if ($images === [])

Henüz galeri görseli yok. “Görsel ekle” ile başlayın.

@endif
İptal
@endsection