@extends('admin.layouts.app') @section('title','Produse') @push('styles') @endpush @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if ($errors->any())
Verifică erorile:
@endif
Produse

Administrare produse

Adaugă produs
Total: {{ $countAll }}
Reset
@forelse($products as $p) @php $img = $p->mainImage; $disk = $img->disk ?? 'public'; $thumb = $img ? (data_get($img->meta,'thumb_312x340') ?? $img->path) : null; $src = $img ? Storage::disk($disk)->url($thumb) : asset('assets/img/product/default.webp'); @endphp @empty @endforelse
Produs Brand Preț Activ Categorie implicită Creat Acțiuni
{{ $p->name }}
{{ $p->name }}
#{{ $p->id }} · {{ $p->slug }}
{{ $p->brand?->name ?? '—' }} {{ number_format((float)$p->price,2) }} @if($p->active) activ @else inactiv @endif {{ $p->defaultCategory?->name ?? '—' }} {{ $p->created_at?->format('d.m.Y H:i') }}
Editează
@csrf @method('DELETE')
Nu există produse.
@if($products->hasPages())
Afișate {{ $products->firstItem() }}–{{ $products->lastItem() }} din {{ $products->total() }} produse {{ $products->onEachSide(1)->links('pagination::bootstrap-5') }}
@endif
@endsection