app/Http/Controllers/EmpleadoController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Models\Empleado  $empleado
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit($id)
    {
        $empleado = Empleado::findOrFail($id);
        return view('empleado.edit', compact('empleado'));
    }
public function edit ( $ id ) { $ empleado = Empleado :: findOrFail ( $ id ) ; return view ( 'empleado.edit' , compact ( 'empleado' ) ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .
//we seach the Empleado by his Id and return it to $empleado //inside the compact the variable goes without the $ symbol