$request->input('title'), 'description' => $request->input('description'), 'user' => Auth::user()->id, ]; $ruleGroup = $repository->storeRuleGroup($data); Session::flash('success', trans('firefly.created_new_rule_group', ['title' => $ruleGroup->title])); Preferences::mark(); if (intval(Input::get('create_another')) === 1) { // set value so create routine will not overwrite URL: Session::put('rule-groups.create.fromStore', true); return redirect(route('rules.rule-group.create'))->withInput(); } // redirect to previous URL. return redirect(Session::get('rule-groups.create.url')); } /** * @return View */ public function index() { $ruleGroups = Auth::user()->ruleGroups()->with('rules')->get(); return view('rules.index', compact('ruleGroups')); } /** * @param Rule $rule */ public function upRule(Rule $rule) { } /** * @param RuleGroup $ruleGroup */ public function editRuleGroup(RuleGroup $ruleGroup) { } }