Please am trying to redirect a page in Laravel7 once a time is clocked e.g once the time is 04:05 the page should redirect.
I tried this below but it didn't work.
public function countdown(){
$currentdate = date("d-m-Y h:i:s");
$futuredate = "02-05-2020 18:4:25";
if($currentdate == $futuredate){
return redirect()->route('welcome');
}
}
Can anyone help on how I can achieve this?