function getingreso(Request $request, Response $response) { $response = $response->withHeader('Content-type', 'application/json'); $data = Ingreso::all(); if (count($data) == 0) { $response = $response->withStatus(404); } $response->getBody()->write($data); return $response; }
public function listaI() { $todoingresos = Ingreso::all(); return View::make('movimiento.ingresos.listar')->with('todoingresos', $todoingresos); }