芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/tblonline.org/app/Http/Controllers/CronJobsController.php
where('mature_date', '<=', date('Y-m-d')) ->get(); foreach ($fixed_deposits as $fixed_deposit) { $fixed_deposit->status = 3; $fixed_deposit->save(); $transaction = new Transaction(); $transaction->user_id = $fixed_deposit->user_id; $transaction->currency_id = $fixed_deposit->currency_id; $transaction->amount = $fixed_deposit->return_amount; $transaction->dr_cr = 'cr'; $transaction->type = 'Deposit'; $transaction->method = 'Online'; $transaction->status = 2; $transaction->note = 'Return of Fixed deposit'; $transaction->save(); try { $transaction->user->notify(new FDRMatured($transaction)); } catch (\Exception $e) {} } DB::commit(); echo 'Scheduled task runs successfully'; } }