fix skit2
This commit is contained in:
@@ -20,7 +20,9 @@ class InformationController extends Controller
|
||||
$pembiayaansemasa = $CustomerInfo['gadai'];
|
||||
}
|
||||
|
||||
return view('includes.information.pembiayaansemasa',compact('pembiayaansemasa'));
|
||||
return response()->json($pembiayaansemasa,200);
|
||||
|
||||
// return view('includes.information.pembiayaansemasa',compact('pembiayaansemasa'));
|
||||
}
|
||||
|
||||
public function pembiayaanaktif()
|
||||
@@ -35,7 +37,8 @@ class InformationController extends Controller
|
||||
$pembiayaansemasa = $CustomerInfo['gadai'];
|
||||
}
|
||||
|
||||
return view('includes.information.pembiayaanaktif',compact('pembiayaansemasa'));
|
||||
return response()->json($pembiayaansemasa,200);
|
||||
// return view('includes.information.pembiayaanaktif',compact('pembiayaansemasa'));
|
||||
}
|
||||
|
||||
public function pembiayaanmelebihi6bulan()
|
||||
@@ -56,7 +59,8 @@ class InformationController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
return view('includes.information.melebihi6bulan',compact('melebihi6bulan'));
|
||||
return response()->json($melebihi6bulan,200);
|
||||
// return view('includes.information.melebihi6bulan',compact('melebihi6bulan'));
|
||||
}
|
||||
|
||||
public function pembiayaanakandilelong()
|
||||
@@ -71,6 +75,8 @@ class InformationController extends Controller
|
||||
$lelong += $CustomerInfo['lelong'];
|
||||
}
|
||||
|
||||
return view('includes.information.lelongan',compact('lelong'));
|
||||
|
||||
return response()->json($lelong,200);
|
||||
// return view('includes.information.lelongan',compact('lelong'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
use App\Models\tacportal;
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class TacController extends Controller
|
||||
@@ -30,14 +31,13 @@ class TacController extends Controller
|
||||
|
||||
$currentDateTime = Carbon::now();
|
||||
$expiretac = tacportal::where('icno',$request->icno)
|
||||
->whereDate('created_at','>=',$currentDateTime)
|
||||
->whereDate('expired_at','<=',$currentDateTime)
|
||||
->where('created_at','>=',$currentDateTime->toDateTimeString())
|
||||
// ->whereTime('expired_at','<=',$currentDateTime)
|
||||
// ->orderBy('tac_id','desc')
|
||||
// ->latest()
|
||||
->whereDate('created_at','=',$currentDateTime)
|
||||
->whereDate('expired_at','=',$currentDateTime)
|
||||
->whereTime('expired_at','>=',$currentDateTime->toDateTimeString())
|
||||
->where('created_at','<=',$currentDateTime->toDateTimeString())
|
||||
->latest()
|
||||
->first();
|
||||
dd($expiretac);
|
||||
|
||||
if($expiretac){
|
||||
return response(['notexpired' => true]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user