Files
rkm-conectasus-ci-sandbox/api/app/Http/Controllers/Cadastro/ServicoManutencaoController.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

63 lines
1.5 KiB
PHP

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