Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function data(Request $req)
- {
- $total = 0;
- try {
- $input['keyword'] = $req->input('src');
- $input['current_status_toko'] = $req->input('current_status_toko', '');
- $input['active'] = $req->input('active', '');
- $countTokoList = App::make('countTokoList');
- $dtoOutput = $countTokoList->execute($input);
- $total = $dtoOutput["total"];
- } catch(CoreException $ex) {
- $total = 0;
- }
- try {
- $input['keyword'] = $req->input('src');
- $input['limit'] = $req->input('limit');
- $input['offset'] = $req->input('offset');
- $input['current_status_toko'] = $req->input('current_status_toko', '');
- $input['active'] = $req->input('active', '');
- Log::debug($input);
- $getTokoList = App::make('getTokoList');
- $dtoOutput = $getTokoList->execute($input);
- $response = Response::ok(["toko_list" => $dtoOutput[0], "total" => $total]);
- } catch(CoreException $ex) {
- $response = Response::fail($ex);
- }
- return $response;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement