Guest User

Untitled

a guest
Jan 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. $heads =DB::table('heads');
  2.  
  3. ->where('companies.company_id',$company)
  4. ->where('participants.dni',$dni)
  5.  
  6.  
  7. public function search(Request $request){
  8. $company=request::get('cliente');//recuperodatosenvporgetopost.
  9. $dni=request::get('search')
  10. $heads =DB::table('heads')
  11. ->join('participants', 'heads.id','=','participants.head_id')
  12. ->join('companies','company.id','=','companies.id')
  13. ->select('companies.name as nom_com','participants.firstlastname as ape_pat','participants.secondlastname as ape_mat','participants.name
  14. as nombre','companies.created_at as fec1','companies.updated_at as fec2')
  15. ->where('companies.company_id',$company)
  16. ->where('dni',$dni)
  17. ->get();
  18. return Response::json('heads');
  19. }
Add Comment
Please, Sign In to add comment