@extends('admin.layouts.index-template', [ 'pageTitle' => $pageTitle, 'items' => $brands, 'collection' => $brands, 'icon' => 'price-tag-3', 'module' => 'Marcas', 'createRoute' => route('brand.create'), 'indexRoute' => route('brand.index'), 'searchPlaceholder' => 'Buscar por nombre o slug...', 'emptyIcon' => 'tags', 'emptyTitle' => 'No hay marcas', 'emptyMessage' => 'Comience agregando su primera marca al catálogo', 'stats' => [ 'all' => [ 'label' => 'Total', 'count' => $brands->total(), 'color' => 'primary', 'icon' => 'price-tag-3' ], 'active' => [ 'label' => 'Activas', 'count' => \App\Models\Marca::where('WEB_VTA', 'S')->where('BORRADO', 'N')->count(), 'color' => 'success', 'icon' => 'checkbox-circle' ], 'inactive' => [ 'label' => 'Inactivas', 'count' => \App\Models\Marca::where('WEB_VTA', 'N')->where('BORRADO', 'N')->count(), 'color' => 'secondary', 'icon' => 'pause-circle' ], 'show_home' => [ 'label' => 'Inicio', 'count' => \App\Models\Marca::where('showHome', 'Yes')->where('BORRADO', 'N')->count(), 'color' => 'warning', 'icon' => 'home' ], 'no_image' => [ 'label' => 'Sin Imagen', 'count' => \App\Models\Marca::where('BORRADO', 'N') ->where(function($query) { $query->whereNull('image') ->orWhere('image', ''); })->count(), 'color' => 'info', 'icon' => 'image' ], 'no_products' => [ 'label' => 'Sin Productos', 'count' => \App\Models\Marca::doesntHave('productos')->where('BORRADO', 'N')->count(), 'color' => 'danger', 'icon' => 'error-warning' ] ] ]) @push('css') @endpush @section('header-buttons') Nueva Marca @endsection @section('action-buttons') @endsection @section('filters')
@endsection @section('table-headers') Código Imagen Marca Productos Estado Fecha SEO con IA Acciones @endsection @section('table-body') @foreach($brands as $brand) {{ trim($brand->CO_MARCA) }} @if(!empty($brand->image)) {{ $brand->DE_MARCA }} @else
@endif
{{ $brand->DE_MARCA }}
{{ strtolower(str_replace(' ', '-', $brand->DE_MARCA)) }}
@if($brand->productos_count > 0) {{ $brand->productos_count }} @else 0 @endif @if($brand->WEB_VTA == 'S') Activa @else Inactiva @endif - @if($brand->ai_generated_at && ($brand->ai_meta_title || $brand->ai_meta_description)) Generado @else No generado @endif
@if($brand->productos_count > 0) @endif
@endforeach @endsection