@php $users = DB::table('users') ->where('id', '!=', Auth::user()->id) ->get(); // dd($users); @endphp
Chat Finder
@foreach ($users as $user)
@if ($user->status == '1')
@else
@endif
{{ $user->name }}
{{ $user->email }}
@endforeach
{{ Auth::user()->name }}
@if (Auth::user()->status == '1')
online
@else
offline
@endif
{{-- @php $messages = DB::table('messages')->get(); @endphp @foreach ($messages as $msg) @php $user = DB::table('users') ->where('id', $msg->sender_id) ->orWhere('id', $msg->receiver_id) ->first(); @endphp @if ($msg->sender_id == Auth::user()->id)
{{ Auth::user()->name }}
{{ $msg->message }}
@else
{{ $user->name }}
{{ $msg->message }}
@endif @endforeach --}}
@vite(['resources/css/app.css', 'resources/js/app.js'])