@extends('admin.master') @section('content')

Subcategory List

Add Subcategory
@forelse($data as $key => $value) @php $imagePath = $value->image ? str_replace('public/', '', $value->image) : null; @endphp @empty @endforelse
SL Image Subcategory Name Slug Category Status Action
{{ $key + 1 }} @if($imagePath && file_exists(public_path($imagePath))) {{ $value->subcategoryName }} @else
No Image
@endif
{{ $value->subcategoryName }} {{ $value->slug }} {{ $value->category ? $value->category->name : 'No Category' }} @if($value->status == 1) Active @else Inactive @endif Edit @if($value->status == 1)
@csrf
@else
@csrf
@endif
@csrf
No subcategory found
@endsection