@extends('layouts.app') @section('title', 'Admin Dashboard') @section('content')

Your Dashboard

@if(session('success'))
{{ session('success') }}
@endif @forelse($posts as $post)
{{-- صورة المستخدم --}}
@if($post->user->avatar) {{ $post->user->name }} @else user->name }}" class="rounded-circle border" width="50" height="50" style="object-fit: cover;" > @endif
{{-- محتوى البوست --}}
{{ $post->title }}

By {{ $post->user->name }} • {{ $post->created_at->diffForHumans() }}

{{ $post->content }}

@csrf @method('DELETE')
{{-- زر الحظر يظهر فقط لو الأدمن هو اللي داخل --}} @if(auth()->user()->role === 'admin')
@csrf
@endif
@empty

No posts found.

@endforelse
@endsection