add api to recover all countries

This commit is contained in:
root 2026-02-24 17:32:00 +01:00
parent f82fd804a2
commit feafbd2747
2 changed files with 7 additions and 0 deletions

View File

@ -341,4 +341,10 @@ class HelperController extends Controller
$agents = $query->selectRaw('id , firstname, lastname, adresse , email , longitude , latitude , phone , transactionNumber , openHours , closeHours , solde , network, country')->get();//->paginate($perPage);
return $this->successResponse($agents);
}
public function allCountries()
{
$countries = Country::select('id', 'name', 'code_dial', 'code_country')->get();
return $this->successResponse($countries);
}
}

View File

@ -19,6 +19,7 @@ $router->group(['prefix' => '', 'middleware' => 'auth'], function () use ($route
$router->post('update_password', 'UserController@updatePassword');
$router->get('agent_codes/{agent_code}', 'HelperController@agentCodes');
$router->get('countries', 'HelperController@countries');
$router->get('all_countries', 'HelperController@allCountries');
$router->get('countries/{dial_code}', 'HelperController@country');
$router->post('paying_networks', 'HelperController@paying_networks');
$router->post('other_paying_networks', 'HelperController@other_paying_networks');