/** * Removes Pages and its Content * @return mixed */ public function saveUnsortedPages() { switch (Input::get('action')) { case 'remove': if (count(Input::get('page')) > 0) { Content::whereIn("page_id", Input::get('page'))->delete(); Page::whereIn("id", Input::get('page'))->delete(); } break; } return Redirect::route('unsortedPages'); }