Files
rkm-conectasus-ci-sandbox/api/app/Http/Controllers/Cadastro/Subgrupo/SubgrupoController.php
Antonio Lopes dos Santos afec302c3e
All checks were successful
build-api-image / build (push) Successful in 51s
init commit
2026-08-04 16:52:02 -03:00

55 lines
1.2 KiB
PHP

<?php
namespace App\Http\Controllers\Cadastro\Subgrupo;
use App\Http\Controllers\Controller;
use App\Services\Cadastro\Subgrupo\SubgrupoService;
use DB;
use Illuminate\Http\Response;
class SubgrupoController extends Controller
{
protected $modulo = 'cadastro';
protected $funcionalidade = 'subgrupo';
public function datatable()
{
return datatables()->of(SubgrupoService::datatable())->skipTotalRecords()->toJson();
}
public function create()
{
$this->auth(__FUNCTION__);
return response()->json(SubgrupoService::create(), Response::HTTP_CREATED);
}
public function store()
{
$this->auth(__FUNCTION__);
return response()->json(SubgrupoService::store(), Response::HTTP_CREATED);
}
public function edit($id)
{
$this->auth(__FUNCTION__);
return response()->json(SubgrupoService::edit($id), Response::HTTP_OK);
}
public function update($id)
{
$this->auth(__FUNCTION__);
return response()->json(SubgrupoService::update($id), Response::HTTP_OK);
}
public function destroy($id)
{
$this->auth(__FUNCTION__);
return response()->json(SubgrupoService::destroy($id), Response::HTTP_NO_CONTENT);
}
}