/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $rubro = Rubro::find($id); return view('rubro.edit', compact('rubro')); }
public function find(Route $route) { $this->rubro = Rubro::find($route->getParameter('rubros')); // rubros es el atributo que figura junto al nombre de la ruta en el archivo de rutas. }