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