@extends('frontend.maintemplate.maintemplate') @section('title', $title . ' :: AgeLess Institute') @section('content')
@forelse($workshops as $workshop)
@php $start = \Carbon\Carbon::parse($workshop->start_time); $end = \Carbon\Carbon::parse($workshop->end_time); $diff = $start->diff($end); // returns DateInterval $date = \Carbon\Carbon::parse($workshop->date); @endphp
{{ $date->format('j F Y') }}
@if($workshop->videos->isNotEmpty()) @endif
{{ $workshop->title }}

Date - {{ $date->format('d M Y') }}

Time - {{ $start->format('g:i A') }} - {{ $end->format('g:i A') }}

Duration - {{ $diff->h }} hr{{ $diff->h != 1 ? 's' : '' }}{{ $diff->i > 0 ? ' ' . $diff->i . ' min' . ($diff->i != 1 ? 's' : '') : '' }}

{{ implode(', ', json_decode($workshop->tags, true)) }}

@empty
Workshops dates will be announced soon. Stay Tuned!
@endforelse
@endsection