@php use Carbon\Carbon; use App\Models\Post; use App\Models\User; use App\Models\Profile; use App\Models\Video; $posts = Post::where('visibility', 'public')->get(); @endphp @extends("layouts.foruzone_layout") @section("title", "Zooner") @section("link-logo") {{route('zooner')}} @endsection @section("logo", "../images/Zooner.png") @section("name-logo", "Zooner") @section("icon", "../images/zooner.ico") @section("side-menu") @endsection @section("content")

Publicações de videos

@foreach ($posts as $post) @if($post->type_id == 3) @php $profile = Profile::where('id', $post->profile_id)->first(); $user = User::where('id', $profile->user_id)->first(); $video = Video::where('post_id', $post->id)->first(); @endphp
Thumbnail do vídeo
{{$post->title}}
@endif @endforeach
@if ($posts->where('type_id', 3)->count() > 4)
@endif @endsection