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

Categories

Add Category {{-- Displaying The Validation Errors: https://laravel.com/docs/9.x/validation#quick-displaying-the-validation-errors AND https://laravel.com/docs/9.x/blade#validation-errors --}} {{-- Determining If An Item Exists In The Session (using has() method): https://laravel.com/docs/9.x/session#determining-if-an-item-exists-in-the-session --}} {{-- Our Bootstrap success message in case of updating admin password is successful: --}} @if (Session::has('success_message')) @endif
{{-- DataTable --}} {{-- using the id here for the DataTable --}} {{-- Through the relationship --}} {{-- Through the relationship --}} @foreach ($categories as $category) {{-- @php echo '
', var_dump($category['parent_category']), '
'; @endphp --}} @if (isset($category['parent_category']['category_name']) && !empty($category['parent_category']['category_name'])) @php $parent_category = $category['parent_category']['category_name']; @endphp @else @php $parent_category = 'Root'; @endphp @endif {{-- Through the relationship --}} {{-- Through the relationship --}} @endforeach
ID Category Name Parent CategoryParent SectionURL Status Actions
{{ $category['id'] }} {{ $category['category_name'] }} {{ $parent_category }}{{ $category['section']['name'] }}{{ $category['url'] }} @if ($category['status'] == 1) {{-- Using HTML Custom Attributes. Check admin/js/custom.js --}} {{-- Icons from Skydash Admin Panel Template --}} @else {{-- if the admin status is inactive --}} {{-- Using HTML Custom Attributes. Check admin/js/custom.js --}} {{-- Icons from Skydash Admin Panel Template --}} @endif {{-- Icons from Skydash Admin Panel Template --}} {{-- Confirm Deletion JS alert and Sweet Alert --}} {{-- --}} {{-- --}} {{-- Icons from Skydash Admin Panel Template --}} {{-- --}} {{-- Check admin/js/custom.js and web.php (routes) --}} {{-- Icons from Skydash Admin Panel Template --}}
@endsection