@extends("app.layout.base") @section("title") Ugentlige aktiviteter @endsection @section("content")

{{ __('msg.ugentligaktiviteter') }}

@if(count(\App\Notification::query()->where("user_id", "=", auth()->user()->id)->get()) > 0)
× {{__('msg.aktivitetaflyst')}} @foreach(\App\Notification::query()->where("user_id", "=", auth()->user()->id)->get() as $notification)

{{ $notification->message }}{{ __("msg.canceled") }}

@endforeach
@endif @if(!$multiEvents->isEmpty()) @foreach($multiEvents as $multiEvent)

{{ ucfirst(\Carbon\Carbon::parse($multiEvent->date)->formatLocalized('%A')) }}

{{$multiEvent->name}}

{{__('msg.af')}}: {{$multiEvent->accountable}}

{{$multiEvent->description}}

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($multiEvent->date))->format('d/m/Y \k\l\. H:i') }}

@if (count(\App\UserEvent::query()->where('multiple_event_id', '=', $multiEvent->id)->where('user_id', '=', Auth::user()->id)->get()) > 0) {{__('msg.afmeld')}} @else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}} {{__('msg.tilmeld')}} @endif $multiEvent->id ])}}">{{__('msg.sedeltagere')}}
@endforeach @endif
@endsection @section("scripts") @endsection