public function updateAnime() { return $this->execute(function () { $keyword = Input::get('keyword'); $mal_id = Input::get('mal_id'); $hum_id = Input::has('hum_id') ? Input::get('hum_id') : null; if (!empty($keyword) && !empty($mal_id)) { $scraper = new AnimeDataScraper(); $result = $scraper->get($mal_id, $keyword, $hum_id); if (!empty($result)) { $scraper->save($result); return View::make('mod_panel')->nest('update_msg', 'child.alerts', array('msg_type' => 'success', 'msg' => 'You succesfully updated <strong>' . $result["title"] . '</strong> to the masterani.me database.')); } } return View::make('mod_panel')->nest('update_msg', 'child.alerts', array('msg_type' => 'warning', 'msg' => 'Didn\'t find any anime matching the keyword/id!')); }); }