|
|
@ -70,9 +70,16 @@ class DivisiController extends Controller |
|
|
|
return response()->json(['status'=>'success','message'=> 'Data deleted!','code'=> 200], 200); |
|
|
|
return response()->json(['status'=>'success','message'=> 'Data deleted!','code'=> 200], 200); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function search() |
|
|
|
public function search(Request $request) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return $this->list(); |
|
|
|
$payload = $request->all(); |
|
|
|
|
|
|
|
$dataBuilder = $this->setUpPayload($payload, 'm_divisi'); |
|
|
|
|
|
|
|
$builder = $dataBuilder['builder']; |
|
|
|
|
|
|
|
$countBuilder = $dataBuilder['count']; |
|
|
|
|
|
|
|
$dataGet = $builder->get(); |
|
|
|
|
|
|
|
$totalRecord = $countBuilder->count(); |
|
|
|
|
|
|
|
return response()->json(['status'=>'success','code'=>200,'data'=>$dataGet, 'totalRecord'=>$totalRecord], 200); |
|
|
|
|
|
|
|
//return $this->list(); |
|
|
|
// cant use builder for this case |
|
|
|
// cant use builder for this case |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|