コード例 #1
0
 public function portada()
 {
     $cant = 10;
     $textosNuevos = textos::orderBy('created_at', 'desc')->take($cant)->get();
     $textosPrestamos = prestamo::orderBy('created_at', 'desc')->take($cant)->get();
     return view("front.portada", ['textosNuevos' => $textosNuevos, 'textosPrestamos' => $textosPrestamos]);
 }
コード例 #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $prestamo = prestamo::find($this->prestamo->id);
     // textos::with('inv_prest')->find(json_decode($prestamo->textos)),
     $arreglo = ['cedula' => $prestamo->cliente->cedula, 'textos' => $prestamo->textos, 'id' => $this->prestamo->id];
     return view('prestamo.edit', compact('arreglo'));
 }