$user = User::where('id', Auth::user()->id)->first();
$user->money = $user->money - $r->amount;
$user->save();
DB::table('withdraw')->insertGetId(['user_id' => Auth::user()->id, 'system' => $r->currency, 'wallet' => $r->purse ,'amount' => $r->amount]);
return json_encode($r->amount);
}
}
auth()->user()