@extends('layouts.app1')
@section('content')
@if (session()->has('message'))
{{ session()->get('message') }}
@endif
@can('is-instructor')
@endcan
@foreach ($posts as $post)
{{ $post->title }}
By {{ $post->user->name }}, Created on {{ date('jS M Y', strtotime($post->updated_at)) }}
{{ $post->description }}
@if (isset(Auth::user()->id) && Auth::user()->id ==
$post->user_id)
Edit
@endif
@endforeach
@endsection