Gestión de Productos

Categorías

@foreach($categorias as $cat) @endforeach
ID Nombre Acciones
{{ $cat->id }} {{ $cat->nombre }}
@csrf @method('DELETE')

Productos

{{-- Changed from 'Imagen' to 'Imagen Principal' --}} @foreach($productos as $prod) {{-- Assuming a 'categoria' relationship --}} @endforeach
ID Nombre Imagen PrincipalPrecio Venta Precio Compra Stock Categoría Acciones
{{ $prod->id }} {{ $prod->nombre }} @if($prod->imagen) @if(Str::startsWith($prod->imagen, 'http')) Imagen del producto @else Imagen del producto @endif @else Sin imagen @endif {{ $prod->precio_venta }} {{ $prod->precio_compra }} {{ $prod->stock }} {{ $prod->categoria->nombre ?? 'N/A' }} {{-- New button for adding more images --}}
@csrf @method('DELETE')