json(ParametrizacaoService::index(), Response::HTTP_OK); } public function create() { $this->auth(__FUNCTION__); return response()->json(ParametrizacaoService::create(), Response::HTTP_OK); } public function store(Request $request) { $this->auth(__FUNCTION__); return response()->json(ParametrizacaoService::store($request), Response::HTTP_CREATED); } public function edit() { $this->auth(__FUNCTION__); return response()->json(ParametrizacaoService::edit(), Response::HTTP_OK); } public function update(Request $request) { $this->auth(__FUNCTION__); return response()->json(ParametrizacaoService::update($request), Response::HTTP_OK); } public function destroy() { $this->auth(__FUNCTION__); return response()->json(ParametrizacaoService::destroy(), Response::HTTP_OK); } public function download() { $response = ParametrizacaoService::download(); $headers = [ 'Content-Type' => 'application/pdf', ]; return response()->download($response['arquivo'], $response['nome'], $headers); } }