Files
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

61 lines
1.4 KiB
PHP

<?php
namespace App\Http\Controllers\TransportePaciente\Veiculo;
use App\Http\Controllers\Controller;
use App\Services\TransportePaciente\Veiculo\VeiculoService;
use Illuminate\Http\Response;
class VeiculoController extends Controller
{
protected $modulo = 'transporte-paciente';
protected $funcionalidade = 'veiculo';
public function create()
{
$this->auth(__FUNCTION__);
return response()->json(VeiculoService::create(), Response::HTTP_OK);
}
public function store()
{
$this->auth(__FUNCTION__);
return response()->json(VeiculoService::store(), Response::HTTP_CREATED);
}
public function datatable()
{
return VeiculoService::datatable()->skipTotalRecords()->toJson();
}
public function edit($id)
{
$this->auth(__FUNCTION__);
return response()->json(VeiculoService::edit($id), Response::HTTP_OK);
}
public function update($id)
{
$this->auth(__FUNCTION__);
return response()->json(VeiculoService::update($id), Response::HTTP_OK);
}
public function bloquear($id)
{
$this->auth(__FUNCTION__);
return response()->json(VeiculoService::bloquear($id), Response::HTTP_OK);
}
public function destroy($id)
{
$this->auth(__FUNCTION__);
return response()->json(VeiculoService::destroy($id), Response::HTTP_NO_CONTENT);
}
}