Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php/Laravel check if date is passed

$now_date = new DateTime();
$due_date = new DateTime($project->due_date);

if ($now_date > $due_date) {
  return redirect()->route('user.projects.index')->with('warningMessage', __('cruds.project.due_date_passed'));
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #date #passed
ADD COMMENT
Topic
Name
4+5 =