@include('tuto.layout.nav')
@if ($videos->count() > 0) @if ($categories->isEmpty())

Aucune vidéo disponible !

@else @foreach ($categories as $category) @if ($category->videos->isNotEmpty())

{{ $category->name }}

@if ($category->videos->count() > 3) Voir plus @endif
@foreach ($category->videos->take(4) as $video)
@if (file_exists(public_path($video->path))) @else
La vidéo n'est pas disponible.
@endif

{{ $video->created_at->format('d M Y') }}

{{ $video->title }}

{{ Str::limit(strip_tags($video->description), 100) }}

@endforeach
@endif @endforeach @endif @else

Aucune vidéo disponible !

@endif