/** * Store a newly created Links in storage. * * @param LinksRequest $request * * @return Response */ public function store(Request $request) { try { $validation = ValidationService::check(Link::$rules); if (!$validation['errors']) { $links = $this->linksRepository->store($request->all()); Quarx::notification('Link saved successfully.', 'success'); if (!$links) { Quarx::notification('Link could not be saved.', 'danger'); } } else { return $validation['redirect']; } } catch (Exception $e) { Quarx::notification($e->getMessage() ?: 'Link could not be saved.', 'danger'); } return redirect(URL::to('quarx/menus/' . $request->get('menu_id') . '/edit')); }