@extends('admin.layout') @section('title') Gestion des Elements @endsection @section('content')

Gestion des Elements


@foreach($elements as $element) @endforeach
Prix Total de Stock: € {{ number_format($elements->sum(function($element) { return ($element->prix_achat ?? 0) * ($element->quantity ?? 0); }), 2, ',', ' ') }}
Image Element Famille Alerte Qte Qte Prix d'achat Prix Total Action
{{ $i++ }} @if($element->photo) @php $photos = json_decode($element->photo); @endphp @if(!empty($photos) && isset($photos[0]) && file_exists(public_path('uploads/' . $photos[0]))) Photo @else No Image @endif @else No Images @endif {{ $element->element ?? '' }} @php $famille = \App\Models\Famille::find($element->familleId); @endphp @if($famille) {{ $famille->nom ?? '' }} @endif {{ $element->stock_alert ?? '' }} {{ $element->quantity ?? 'N/A' }} € {{ number_format($element->prix_achat ?? 0, 2, ',', ' ') }} € {{ number_format(($element->prix_achat ?? 0) * ($element->quantity ?? 0), 2, ',', ' ') }} Gérer le Stock Modifier Supprimer
@endsection @section('script') @endsection