@extends("admin.layout.base") @extends("admin.layout.header") @section("title") Home - Admin Panel @endsection @section("content") {{-- Brugere --}}

Brugere

{{ count(\App\User::all()) }}

@for($i = 0; $i < 5 && $i < count(\App\User::query()->orderByDesc("id")->get()); $i++) @endfor
Nyeste brugere
{{ ucfirst(strtolower(\App\User::query()->orderByDesc("id")->get()[$i]->name_first)) . ' ' . ucfirst(strtolower(\App\User::query()->orderByDesc("id")->get()[$i]->name_last)) }}
{{-- Aktiviteter --}}

Aktiviteter

{{ count(\App\Event::all()) }}

Næste aktivitet
@if(\App\Event::query()->orderByDesc("date")->first() !== null)
@if(\App\Event::query()->orderByDesc("date")->first()->resource_id !== null)
{{ \App\Event::query()->orderByDesc("date")->first()->name }}
{{__('msg.af')}}: {{ \App\Event::query()->orderByDesc("date")->first()->accountable }}
{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderByDesc("date")->first()->date))->format('d/m/Y \k\l\. H:i') }}
@else

{{ \App\Event::query()->orderByDesc("date")->first()->name }}

Af: {{ \App\Event::query()->orderByDesc("date")->first()->accountable }}

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderByDesc("date")->first()->date))->format('d/m/Y \k\l\. H:i') }}

@endif
{!! \App\Helpers::closetags(substr(\App\Event::query()->orderByDesc("date")->first()->description, 0, 300) )!!}
first()->id }}">
@else

Der er ingen aktiviteter

@endif

Vejledninger

{{ count(\App\Guide::all()) }}

@if(count(\App\Guide::all()) > 0) @for($i = 0; $i < 5 && $i < count(\App\Guide::query()->orderByDesc("id")->get()); $i++) @endfor @else @endif
Seneste Vejledninger
{{ ucfirst(strtolower(\App\Guide::query()->orderByDesc("id")->get()[$i]->name)) }}
Der er ingen vejledninger

Menuplan

{{ count(\App\MenuPlan::all()) }}

@if(\App\MenuPlan::query()->where("week", "=", date('W'))->first() !== null) {{-- \App\MenuPlan::query()->where("week", "=", date('W'))->first() --}} @else

Der er ingen menuplan for denne uge

@endif
Ugens Menuplan
{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->monday }}
{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->tuesday }}
{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->wednesday }}
{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->thursday }}
@endsection