69 lines
1.6 KiB
PHP
69 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\PainelSenha;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\PainelSenha\OpcaoEntradaService;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Response;
|
|
|
|
class OpcaoEntradaController extends Controller
|
|
{
|
|
protected $modulo = 'painel-senha';
|
|
protected $funcionalidade = 'opcao-entrada';
|
|
|
|
public function index()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(OpcaoEntradaService::index(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function create()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(OpcaoEntradaService::create(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function store(Request $request)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(OpcaoEntradaService::store($request), Response::HTTP_CREATED);
|
|
}
|
|
|
|
public function show($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(OpcaoEntradaService::show($id), Response::HTTP_OK);
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(OpcaoEntradaService::edit($id), Response::HTTP_OK);
|
|
}
|
|
|
|
public function update(Request $request, $id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(OpcaoEntradaService::update($request, $id), Response::HTTP_OK);
|
|
}
|
|
|
|
public function destroy($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(OpcaoEntradaService::destroy($id), Response::HTTP_NO_CONTENT);
|
|
}
|
|
|
|
public function list()
|
|
{
|
|
return response()->json(OpcaoEntradaService::list(), Response::HTTP_OK);
|
|
}
|
|
}
|