@if ($videos->count() > 0) @foreach ($videos as $video) @php /* $daysPassed = \Carbon\Carbon::parse($video->created_at)->diffInDays(now()); $timeAgoText = $daysPassed == 0 ? 'Today' : ($daysPassed == 1 ? '1 day ago' : $daysPassed . ' days ago'); */ $date = \Carbon\Carbon::parse($video->capture_datetime); $timeAgoText = $date->format('F j, Y'); //$thumbnailPath = str_replace('.mp4', '.jpg', $video->url); $baseFilename = str_replace('.mp4', '', $video->url); $thumbnailUrls = []; for ($i = 0; $i < $video->no_of_thumbnails; $i++) { $thumbnailUrls[] = Storage::disk('s3_thumbnails')->url("{$baseFilename}" . ($video->no_of_thumbnails > 1 ? "-{$i}" : '') . '.jpg'); } @endphp @if ($video->file_type == 1)
Video Thumbnail Play Button
{{ $video->title }}

{{ $video->description }}

{{ $timeAgoText }}

@endif @endforeach @else

No files found.

@endif