public function postDeadline() { $deadline = DBDeadlineController::getDeadline(); $date = explode('-', $deadline, 3); if ($date[1] == '01') { $month = 1; } elseif ($date[1] == '02') { $month = 2; } elseif ($date[1] == '03') { $month = 3; } elseif ($date[1] == '04') { $month = 4; } elseif ($date[1] == '05') { $month = 5; } elseif ($date[1] == '06') { $month = 6; } elseif ($date[1] == '07') { $month = 7; } elseif ($date[1] == '08') { $month = 8; } elseif ($date[1] == '09') { $month = 9; } elseif ($date[1] == '10') { $month = 10; } elseif ($date[1] == '11') { $month = 11; } elseif ($date[1] == '12') { $month = 12; } return View::make("G1SAS/ChangeDeadline")->with('deadline', $deadline)->with('date', $date)->with('month', $month); }
<?php Route::get('/', function () { $result = DBDeadlineController::getIsdatepassed(); //if((date_diff(date_create(date("Y-m-d")),date_create(DBDeadlineController::getDeadline()))->format('%a'))>0){ if (strtotime(date("Y-m-d")) - strtotime(DBDeadlineController::getDeadline()) > 0) { DBDeadlineController::setIsdatepassed(true); } else { DBDeadlineController::setIsdatepassed(false); } if (DBDeadlineController::getIsdatepassed()) { return View::make('G1SAS/login')->with('message', 'Welcome to official web site')->with('greet', 'Applications for this year is closed.'); } else { return View::make('G1SAS/login')->with('message', 'Welcome to official web site')->with('greet', 'Applications are now on!'); } }); Route::get('guardian', function () { return View::make('G1SAS/AddGuardian'); }); Route::controller('userpage', 'UserPageController'); Route::controller('search', 'SearchController'); Route::controller('selectSchool', 'ApplicationController'); Route::controller('school', 'SchoolController'); Route::controller('login', 'LoginController'); Route::controller('guardian', 'GuardianController'); Route::controller('child', 'ChildController'); Route::controller('admin', 'AdminController'); Route::controller('edit', 'EditController'); /* /*