added countries support

This commit is contained in:
Mark Gregory
2026-06-15 09:05:15 +01:00
parent e91b4251fd
commit 63a9981c7c
21 changed files with 653 additions and 284 deletions
+7 -15
View File
@@ -1,18 +1,10 @@
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Modules\Countries\Http\Controllers\Api\CountriesApiController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:api')->get('/countries', function (Request $request) {
return $request->user();
});
Route::prefix('countries')->name('api.countries.')->group(function (): void {
Route::get('/', [CountriesApiController::class, 'index'])->name('index');
Route::get('/active', [CountriesApiController::class, 'active'])->name('active');
Route::get('/{country:alpha2}', [CountriesApiController::class, 'show'])->name('show');
});