This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Cadastro;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Cadastro\UnidadeExecutanteManutencaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class UnidadeExecutanteManutencaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'cadastro';
|
||||
protected $funcionalidade = 'unidade-executante-manutencao';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return datatables()
|
||||
->of(UnidadeExecutanteManutencaoService::datatable())
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(UnidadeExecutanteManutencaoService::create(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(UnidadeExecutanteManutencaoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(UnidadeExecutanteManutencaoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(UnidadeExecutanteManutencaoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(UnidadeExecutanteManutencaoService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
public function autocompleteUnidade()
|
||||
{
|
||||
return datatables()
|
||||
->of(UnidadeExecutanteManutencaoService::autocompleteUnidade())
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function autocompleteFornecedor()
|
||||
{
|
||||
return datatables()
|
||||
->of(UnidadeExecutanteManutencaoService::autocompleteFornecedor())
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user