2021-10-04 16:24:39 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** @var \Laravel\Lumen\Routing\Router $router */
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Application Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register all of the routes for an application.
|
|
|
|
| It is a breeze. Simply tell Lumen the URIs it should respond to
|
|
|
|
| and give it the Closure to call when that URI is requested.
|
|
|
|
|
|
|
|
|
*/
|
2021-10-19 14:35:01 +00:00
|
|
|
$router->group(['prefix' => '', 'middleware' => 'auth'], function () use ($router) {
|
|
|
|
// Insurances routes
|
|
|
|
$router->group(['prefix' => '/insurances'], function () use ($router) {
|
2021-10-27 12:48:07 +00:00
|
|
|
$router->get('', 'InsuranceController@getInsurances');
|
2021-11-09 08:30:31 +00:00
|
|
|
$router->get('networks', 'InsuranceController@getInsurancesNetworks');
|
|
|
|
$router->put('{id}/add-beneficiaries', 'InsuranceController@addBeneficiaries');
|
|
|
|
|
|
|
|
// Subscriptions
|
2021-10-27 12:48:07 +00:00
|
|
|
$router->group(['prefix' => '/subscriptions'], function () use ($router) {
|
2021-11-04 17:07:15 +00:00
|
|
|
$router->post('bonus-amount', 'InsuranceSubscriptionController@calculateBonusAmount');
|
|
|
|
$router->post('upload-images', 'InsuranceSubscriptionController@uploadImages');
|
|
|
|
$router->post('', 'InsuranceSubscriptionController@subscribe');
|
|
|
|
$router->put('{id}/validate', 'InsuranceSubscriptionController@validateSubscription');
|
|
|
|
$router->put('{id}/reject', 'InsuranceSubscriptionController@rejectSubscription');
|
|
|
|
$router->put('{id}/pay', 'InsuranceSubscriptionController@paySubscription');
|
|
|
|
$router->get('', 'InsuranceSubscriptionController@getSubscriptions');
|
2021-10-27 12:48:07 +00:00
|
|
|
});
|
2021-10-19 14:35:01 +00:00
|
|
|
});
|
2021-11-15 15:01:54 +00:00
|
|
|
|
|
|
|
// Insurances routes
|
|
|
|
$router->group(['prefix' => '/insured'], function () use ($router) {
|
|
|
|
//Search
|
2021-11-15 15:59:42 +00:00
|
|
|
$router->get('', 'InsuredController@getInsured');
|
2021-11-15 15:01:54 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//QRCode for agents
|
|
|
|
$router->get('qrcode/generate/{id_user}', 'QRCodeController@generate');
|
|
|
|
$router->get('qrcode/read/{id_user}', 'QRCodeController@read');
|
|
|
|
$router->get('qrcode/image/{id_user}', 'QRCodeController@image');
|
2021-10-04 16:24:39 +00:00
|
|
|
});
|