// } // //var_dump($time); // $input = '2015-07-23 05:08:18'; // $format = 'Y-m-d H:i:s'; // // $date = Carbon::createFromFormat('Y-m-d H:i:s', $input); // var_dump($date); //}); Route::filter("checkUser", function () { if (Session::get('role') != 2) { return Redirect::to("/"); } }); Route::group(array("prefix" => "admin", "before" => "checkUser"), function () { Route::get("/", function () { $log = Logfile::orderBy('id', 'desc')->paginate(25); return View::make('backend.home')->with('log', $log); }); }); Route::get('/', function () { $new = Post::all()->take(3); return View::make('frontend.home')->with('new', $new); }); Route::get('data', function () { return View::make('frontend.ajax'); }); Route::get('ckfinder', function () { return View::make('ckfinder'); }); Route::group(array("prefix" => "check"), function () { Route::post("check-username", function () {