/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { //Get material $materialOption = MaterialOption::where('material_option_id', '=', $id)->first(); $materials = Material::lists('name', 'material_id'); return view('materialoption.edit', compact('materialOption', 'materials')); }