diff --git a/src/app/Http/Controllers/API/V4/Admin/UsersController.php b/src/app/Http/Controllers/API/V4/Admin/UsersController.php --- a/src/app/Http/Controllers/API/V4/Admin/UsersController.php +++ b/src/app/Http/Controllers/API/V4/Admin/UsersController.php @@ -90,6 +90,22 @@ $result->push($owner); } } + } elseif (substr($search, 0, 4) == 'cst_') { + $wallet = \App\WalletSetting::where('value', $search)->first()->wallet(); + + if ($wallet) { + if ($owner = $wallet->owner()->withTrashed()->first()) { + $result->push($owner); + } + } + } elseif (substr($search, 0, 3) == 'tr_') { + $payment = \App\Payment::find($search); + + if ($payment) { + if ($owner = $payment->wallet()->owner()->withTrashed()->first()) { + $result->push($owner); + } + } } elseif (!empty($search)) { $wallet = Wallet::find($search);