@extends('admin.layouts.app') @section('title', 'Ürünler | Admin') @push('styles') @endpush @section('content')
@php $adminUser = request()->attributes->get('promo_admin_user'); $canProductsDelete = $adminUser && ($adminUser->isSuperAdmin() || $adminUser->can('products', 'delete')); $canProductsUpdate = $adminUser && ($adminUser->isSuperAdmin() || $adminUser->can('products', 'update')); @endphp
@if(session('success'))

{{ session('success') }}

@endif

Ürünler

Tüm işletmelerin eklediği ürünler.

Çöp kutusu
@forelse($products as $p) @php $mainImage = $p->galleryMedia->first(); @endphp @empty @endforelse
Görsel Ürün İşletme Kategori Fiyat Durum İşlem
@if($mainImage) @php $imgUrl = asset('storage/' . $mainImage->file_path); @endphp {{ $p->name }} @else
@endif
{{ $p->name }}
{{ $p->slug }}
{{ $p->business->name ?? '-' }} {{ $p->productCategory->name ?? '-' }} @if($p->price_from !== null) {{ number_format($p->price_from, 0, ',', '.') }} TL @else - @endif @if($canProductsUpdate) @else @if($p->is_active) Aktif @else Pasif @endif @endif Detay @if($canProductsDelete)
@csrf @method('DELETE')
@endif
Henüz ürün yok.
@if($products->hasPages())
{{ $products->withQueryString()->links() }}
@endif
@endsection @push('scripts') @endpush