コード例 #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $empleado = Empleado::find($id);
     $empleado->emptipo;
     $emptipos = Emptipo::orderBy('tipo', 'ASC')->lists('tipo', 'id');
     return view('admin.empleados.edit')->with('empleado', $empleado)->with('emptipos', $emptipos);
 }
コード例 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $emptipos = Emptipo::orderBy('id', 'ASC')->paginate(5);
     return view('admin.emptipos.index')->with('emptipos', $emptipos);
 }