added countries support expanded for ISO 3166 standard merged in new support

This commit is contained in:
Mark Gregory
2026-06-15 10:16:57 +01:00
parent 8a6eb74ebb
commit 6acc6de707
7 changed files with 126 additions and 30 deletions
@@ -7,19 +7,36 @@ use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
/**
* Register Countries module routes.
*/
public function map(): void
{
$this->mapApiRoutes();
$this->mapWebRoutes();
$this->mapApiRoutes();
}
/**
* Register web routes from the real module path.
*/
protected function mapWebRoutes(): void
{
Route::middleware(['web', 'auth'])->group(module_path('Countries', 'Routes/web.php'));
$path = dirname(__DIR__).'/Routes/web.php';
if (is_file($path)) {
Route::middleware(['web', 'auth'])->group($path);
}
}
/**
* Register API routes from the real module path.
*/
protected function mapApiRoutes(): void
{
Route::prefix('api/v1')->middleware(['api', 'auth:sanctum'])->group(module_path('Countries', 'Routes/api.php'));
$path = dirname(__DIR__).'/Routes/api.php';
if (is_file($path)) {
Route::middleware(['api'])->group($path);
}
}
}