@php use Carbon\Carbon; @endphp {{-- display linkedin posts like display at the linkedin--}}
LinkedIn Posts
@php $posts = \App\Models\Post::all(); @endphp @foreach($posts as $post)
Samena Council
{{ $post->company_name }}
@php $postDate = Carbon::parse($post->date); $now = Carbon::now(); $diffInMinutes = $now->diffInMinutes($postDate); $diffInHours = $now->diffInHours($postDate); $diffInDays = $now->diffInDays($postDate); $diffInMonths = $now->diffInMonths($postDate); $diffInYears = $now->diffInYears($postDate); @endphp @if ($diffInMinutes < 60) {{ $diffInMinutes }} minutes ago @elseif ($diffInHours < 24) {{ $diffInHours }} hours ago @elseif ($diffInDays < 30) {{ $diffInDays }} days ago @elseif ($diffInMonths < 12) {{ $diffInMonths }} months ago @else {{ $diffInYears }} years ago @endif

{{ $post->post_content}}

post image
{{-- card footer add linkedin like button comment and share button--}}
@endforeach