This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Imunizacao;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Cadastro\VacinaService;
|
||||
use App\Services\Imunizacao\RelatorioFaltosoAprazamentoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioFaltosoAprazamentoController extends Controller
|
||||
{
|
||||
protected $modulo = 'imunizacao';
|
||||
protected $funcionalidade = 'relatorio-faltoso-aprazamento';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioFaltosoAprazamentoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(RelatorioFaltosoAprazamentoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteVacina()
|
||||
{
|
||||
return datatables()
|
||||
->of(RelatorioFaltosoAprazamentoService::autocompleteVacina())
|
||||
->filterColumn('descricao', function ($query, $keyword) {
|
||||
|
||||
$query->whereRaw(VacinaService::getDescricaoRaw() . " like ?", ["%{$keyword}%"]);
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user