@extends('admin.layouts.main') @php $page_name = 'Category'; @endphp @section('content')

{{ $edit ? 'Edit' : 'Add' }} {{ $page_name }}

@csrf @if ($edit) @endif
@if ($edit) Cancel @endif

{{ $page_name }} List

@if (!$edit) @endif
@foreach ($categories as $key => $category) @endforeach
# Category Name Actions
{{ $key + 1 }} {{ $category->name }} Edit
{{ $categories->links() }}
@include('components.alertmodal', [ 'modal_id' => 'deleteCategoryModal', 'form_id' => 'deleteCategoryForm', 'action' => route('admin.deletecategory'), 'modal_title' => 'Alert!', 'input_id' => 'deleteCategoryId', 'modal_mess' => 'Are you sure you want to delete this category?', 'button_type' => 'submit', 'button_id' => 'confirmDeleteCategoryButton', ]) @endsection @section('script') @endsection