json(AprovacaoEntradaService::list(), Response::HTTP_OK); } public function edit($id) { $this->auth(__FUNCTION__); return response()->json(AprovacaoEntradaService::edit($id), Response::HTTP_OK); } public function approve($id) { $this->auth(__FUNCTION__); AprovacaoEntradaService::approve($id); return response()->noContent(); } public function reject($id) { $this->auth(__FUNCTION__); AprovacaoEntradaService::reject($id); return response()->noContent(); } public function datatable(Request $request) { return datatables() ->of(AprovacaoEntradaService::datatable($request)) ->skipTotalRecords() ->toJson(); } }