SHARE
TWEET

Untitled

wansyahi1 Dec 14th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  $dataGender = $request->dataGender;
  2.  $ethnicity = $request->ethnicity;
  3.  $area = $request->area;
  4.  $state = $request->state;
  5.  $namaDUN = $request->namaDUN;
  6.  
  7.     $query = ModifiedDppr::query();
  8.    
  9.     if(!empty($request->dataGender)){
  10.         $query->where('Jantina',$dataGender);
  11.     }
  12.    
  13.     if(!empty($request->ethnicity)){
  14.         $query->where('Bangsa_updated','$ethnicity');
  15.     }
  16.  
  17.     if(!empty($request->area)){
  18.         $query->where('Taman_area',$area);
  19.     }
  20.  
  21.     if(!empty($request->state)){
  22.         $query->where('Negeri',$state);
  23.     }
  24.  
  25.     if(!empty($request->namaDUN)){
  26.         $query->where('namaDUN',$namaDUN);
  27.     }
  28.    
  29.     $data = $query->get();
  30.  
  31.  return datatables()->of($data)->make(true);
  32.  
  33.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top