fix skit2
This commit is contained in:
@@ -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