This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\TransportePaciente;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\TransportePaciente\FechamentoService;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class FechamentoController extends Controller
|
||||
{
|
||||
protected $modulo = 'transporte-paciente';
|
||||
|
||||
protected $funcionalidade = 'fechamento-viagem';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FechamentoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FechamentoService::update($id, $request), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function getVeiculos()
|
||||
{
|
||||
return response()->json(FechamentoService::getVeiculos(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getMotoristas()
|
||||
{
|
||||
return response()->json(FechamentoService::getMotoristas(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getHorarios()
|
||||
{
|
||||
return response()->json(FechamentoService::getHorarios(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function search()
|
||||
{
|
||||
return response()->json(FechamentoService::search(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user