@extends('layouts.main') @section('content') @php //fetch users with pagination if (!empty($_GET['search'])) { $neenoe = request()->query('search'); //where('title','like','%'.$search.'%') $users = DB::table('users') ->where('name','like','%'.$neenoe.'%') ->orWhere('email','like','%'.$neenoe.'%') ->orWhere('phone','like','%'.$neenoe.'%') ->orderBy('id', 'desc')->paginate(10); }else { $users = DB::table('users')->orderBy('id', 'desc')->paginate(10); } @endphp
Manage All Users
@csrf
Manage All Users
@if ($users->count() > 0) @foreach ($users as $user) @endforeach @else @endif
Join Time Full Name Username Email Phone Balance Action
{{ \Carbon\Carbon::parse($user->created_at)->diffForHumans() }} {{ $user->name }} {{ $user->name }} {{ $user->email }} {{ $user->phone }} KES.{{ $user->balance }}

No user Found

@endsection