public function store(Request $request) { $item = new Item(); $item->setSymPass($request->session()->get('sym_pass')); $item->key = $request->key; $item->val = $request->val; $item->resource_id = $request->resource_id; $item->save(); return redirect()->route('resource.show', ['id' => $request->resource_id]); }