50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?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);
|
|
}
|
|
}
|