return 'AJAX requests only'; }); Route::post('/anime/recent', function () { if (Request::ajax()) { if (Input::has('type')) { $gallery = Input::get('type') === 'gallery'; MasterAnime::createRecentLayoutCookie($gallery); return Latest::getLatest(array("start" => 0, "end" => 12), $gallery); } } return 'AJAX requests only'; }); Route::post('/anime/search', function () { if (Request::ajax()) { $animelist = Input::has('animelist'); $search_results = MasterAnime::searchAnime(Input::get('keyword')); if ($animelist) { return View::make('child.all_anime', array('search_display' => array('view' => false, 'series' => $search_results))); } return View::make('child.all_anime', array('search_display' => array('view' => true, 'series' => $search_results))); } return 'AJAX requests only'; }); Route::post('/anime/scraper', function () { if (Request::ajax()) { if (Sentry::check()) { $user = Sentry::getUser(); if ($user->isSuperUser()) { $id = Input::get('anime_id'); return Mirror::put($id); }