init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Http\Controllers\Apac;
use App\Http\Controllers\Controller;
use App\Services\Apac\ExportacaoService;
use Illuminate\Http\Response;
class ExportacaoController extends Controller
{
protected $modulo = 'apac';
protected $funcionalidade = 'exportacao';
public function create()
{
$this->auth(__FUNCTION__);
return response()->json(ExportacaoService::create(), Response::HTTP_OK);
}
public function store()
{
$this->auth(__FUNCTION__);
return response()->json(ExportacaoService::store(), Response::HTTP_CREATED);
}
public function update($id)
{
$this->auth(__FUNCTION__);
return response()->json(ExportacaoService::update($id), Response::HTTP_CREATED);
}
public function destroy($id)
{
$this->auth(__FUNCTION__);
return response()->json(ExportacaoService::destroy($id), Response::HTTP_NO_CONTENT);
}
public function datatable()
{
return datatables()->of(ExportacaoService::datatable())->skipTotalRecords()->make(true);
}
public function download($id)
{
$response = ExportacaoService::download($id);
$headers = [
'Content-Type' => 'text/plain;charset=UTF-8',
];
return response()->download($response['arquivo'], $response['nome'], $headers);
}
}