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

All Category Lists

@if (session()->has('message'))
{{ session()->get('title')}}..!
{{ session()->get('message')}}
@endif @php $id=0;@endphp @foreach($categories as $category) @php $id++;@endphp @endforeach
No Category Name Total Posts
{{$id}} {{$category->name}} {{count($category->posts)}}

Add Category

@csrf
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@endsection