@extends('_backend.app') @section('content')

Uživatelé

@foreach ($users as $user) @php $previous = null @endphp @foreach($user->weightHistory as $weightHistory) @php $diff = is_null($previous) ? null : $previous - $weightHistory->weight @endphp @php $previous = $weightHistory->weight @endphp @endforeach @endforeach
Jméno E-mail Registrován
{{ $user->name }} {{ $user->email }} {{$user->created_at}}
{{$weightHistory->created_at}} {{$weightHistory->weight}} kg @if(!is_null($diff)) @if ($diff > 0) {{ $diff }} kg @endif @if ($diff == 0) @endif @if ($diff < 0) {{ $diff }} kg @endif @endif
@endsection