Esempio n. 1
0
 function ofertasByUsuario(Request $request, Response $response)
 {
     $response = $response->withHeader('Content-type', 'application/json');
     $id = $request->getAttribute('id');
     $data = Oferta::where("idUsuario", "=", $id)->get();
     if (count($data) == 0) {
         $response = $response->withStatus(404);
     }
     $response->getBody()->write($data);
     return $response;
 }
Esempio n. 2
0
 public function getOfertasComp()
 {
     return Oferta::where('area_empleo', '=', $this->areaEmpleo_id)->get();
 }