@extends('backend.layouts_backend.master2') @section('title') All Brands @endsection @section('content') {{-- header --}}

All Brands

@if (Auth::user()->can('brand-create')) @endif @if (Auth::user()->can('brands-inactive')) @endif
{{-- end header --}}
{{-- alert add item --}} @if (session('messagesave')) {{--
{{ session('message')}}
--}} @endif {{-- alert delete item --}} @if (session('messagedelete')) {{--
{{ session('messagedelete')}}
--}} @endif {{-- alert update item --}} @if (session('messageupdate')) @endif
@foreach ($brands as $key => $brand) {{-- view details modal --}} {{-- end of view modal --}} @endforeach
#Id Brand Code Image Brand Status Brand Name Use Status Registered On Created By Action
{{ $key + 1 ?? 'N/A' }} {{ $brand->brand_code ?? 'N/A' }} preview @if ($brand->brand_status == 1) {{ get_status_message($brand->brand_status) ?? '' }} @elseif($brand->brand_status == 2) {{ get_status_message($brand->brand_status) ?? '' }} @else No Status @endif {{ $brand->brand_name ?? 'N/A' }} @php $checkBrandInUse = $brand->products()->exists(); @endphp @if ($checkBrandInUse) In Use @else Not In Use @endif {{ short_date($brand->created_at) ?? 'N/A' }} {{ get_user_fullname_temporary($brand->created_by) ?? 'N/A' }}
@if (Auth::user()->can('brand-show')) @endif @if (Auth::user()->can('brand-edit')) @endif @if (Auth::user()->can('brand-delete')) @if (!$checkBrandInUse)
@csrf @method('DELETE')
@endif @endif

@endsection