@php use Carbon\Carbon; @endphp @foreach ($users as $user)

Name : {{$user->name}}

Email : {{$user->email}}

IP Address : {{$user->ip_address}}

@if(Cache::has('user-is-online-' . $user->id)) @php $color = 'bg-green-700'; $status = 'online'; @endphp

Last Active : Now

@else @php $color = 'bg-red-700'; $status = 'offline'; @endphp

Last Active :@if($user->last_seen == null) None @else {{ Carbon::parse($user->last_seen)->diffForHumans() }} @endif

@endif {{$status}}
@endforeach