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

Post

@if ($message = Session::get('success')) @endif @if (Session::has('error')) @endif

Post List

@foreach ($posts as $index => $post) @endforeach
Sr no. Title Description Total Likes Total Comments Uploaded by Action
{{ $index + 1 }} {{ $post->title }} {{ substr($post->description, 0, 100) }}... {{ $post->likes_count }} {{ $post->comments_count }} {{ $post->uploaded_by }} View Edit
@csrf @method('DELETE') @if (Auth::id() == $post->user_id) @endif
@endsection