api for customer online update

This commit is contained in:
LAPTOP-DGCU80CH\user1
2020-11-17 10:47:35 +08:00
parent cb3a5b91c2
commit 057059feb0
6 changed files with 93 additions and 11 deletions
+6 -1
View File
@@ -46,7 +46,12 @@ class DailyGadai extends Command
foreach($cawangan as $cawangan_mysql){
$all_gadai = Gadai::on($cawangan_mysql['mysql'])->where('sttebus','!=','L')->orWhere('sttebus','!=','T')->get();
foreach($all_gadai as $gadai){
$tarikh_gadai = Carbon::parse($gadai['t_gadai'].' '. $gadai['masa']);
if($gadai['t_update'] == null){
$tarikh_gadai = Carbon::parse($gadai['t_gadai'].' '. $gadai['masa']);
}else{
$tarikh_gadai = Carbon::parse($gadai['t_update'].' 00:00:00' );
}
$diff = date_diff($tarikh_gadai,$current);
$month = $diff->format("%m");
$days = $diff->format("%d");
+1 -1
View File
@@ -30,6 +30,6 @@ class Kernel extends ConsoleKernel
{
//
$schedule->command('gadai:daily')->daily()->timezone('Asia/Kuala_Lumpur');
$schedule->command('gadai:daily')->daily()->timezone('Asia/Kuala_Lumpur')->at('00:00');
}
}