fix skit2

This commit is contained in:
hafifierahman
2022-04-26 10:35:36 +08:00
parent 20a9e2764b
commit b75eecdafb
8 changed files with 625 additions and 108 deletions
+7 -7
View File
@@ -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]);
}