芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/app/Http/Controllers/Deposit/ManualController.php
currency_id)->first(); $amountToAdd = $request->amount/$currency->value; $deposit = new Deposit(); $deposit['deposit_number'] = Str::random(12); $deposit['user_id'] = auth()->id(); $deposit['currency_id'] = $request->currency_id; $deposit['amount'] = $amountToAdd; $deposit['method'] = $request->method; $deposit['txnid'] = $request->txn_id4; $deposit['status'] = "pending"; $deposit->save(); $gs = Generalsetting::findOrFail(1); $user = auth()->user(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Deposit", 'cname' => $user->name, 'oamount' => $amountToAdd, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $user->email; $subject = " You have deposited successfully."; $msg = "Hello ".$user->name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->route('user.deposit.create')->with('success','Deposit amount '.$request->amount.' ('.$request->currency_code.') successfully!'); } }