@extends('layouts.main') @section('content') @php //fetch users with pagination if (!empty($_GET['search'])) { $neenoe = request()->query('search'); //where('title','like','%'.$search.'%') $cashouts = DB::table('cashouts')->where('status', 'approved')->where('phone','like','%'.$neenoe.'%')->orWhere('amount','like','%'.$neenoe.'%')->orWhere('phone','like','%'.$neenoe.'%')->paginate(10); }else { $cashouts = DB::table('cashouts')->where('status', 'approved')->paginate(10); } @endphp
Approved withdrawals
@csrf
Approved withdrawal History
@if ($cashouts->count() > 0) @foreach ($cashouts as $c) @endforeach @else @endif
Date Code Username Phone Charge Amount Status
{{ \Carbon\Carbon::parse($c->created_at)->diffForHumans() }} {{ $c->code }} @php $thisguy = DB::table('users')->where('phone', $c->phone)->first(); $iduser = $thisguy->id ?? 1; @endphp {{ $thisguy->username ?? "nouser" }} {{ $c->phone }} KSH {{ $c->Charge }} KSH {{ $c->amount }}
No search results found
@endsection