This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Imunizacao;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Imunizacao\RegistroVacinacaoService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RegistroVacinacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'imunizacao';
|
||||
protected $funcionalidade = 'registro-vacinacao';
|
||||
|
||||
public function index()
|
||||
{
|
||||
return response()->json(RegistroVacinacaoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RegistroVacinacaoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RegistroVacinacaoService::store($request), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RegistroVacinacaoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RegistroVacinacaoService::update($request, $id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RegistroVacinacaoService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(RegistroVacinacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getOcupacoes(Request $request)
|
||||
{
|
||||
return response()->json(RegistroVacinacaoService::getOcupacoes($request), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user