This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\LivroTalidomidaService;
|
||||
use App\Services\Farmacia\LivroService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class LivroTalidomidaController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'livro-talidomida';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return LivroTalidomidaService::datatable();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(LivroTalidomidaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getLinhas($paginaId)
|
||||
{
|
||||
return response()->json(LivroTalidomidaService::getLinhas($paginaId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function fecharLivro($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::fecharLivro($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getDataAbertura($livroRegistroId, $livroRegistroTipoId)
|
||||
{
|
||||
return response()->json(
|
||||
LivroService::getDataAbertura($livroRegistroId, $livroRegistroTipoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user