structure and style updates

This commit is contained in:
Mark Gregory
2026-06-16 23:21:49 +01:00
parent 80991208af
commit 2c2af4c50e
60 changed files with 209 additions and 216 deletions
+4 -3
View File
@@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Route;
Route::view('/', 'welcome')->name('home');
@@ -14,7 +15,7 @@ require __DIR__.'/settings.php';
Route::get('/api/countries/resolve/{code}', function (string $code) {
$normalised = strtoupper(trim($code));
$country = \Illuminate\Support\Facades\DB::table('countries')
$country = DB::table('countries')
->whereRaw('UPPER(alpha2) = ?', [$normalised])
->orWhereRaw('UPPER(alpha3) = ?', [$normalised])
->orWhere('numeric', $normalised)
@@ -43,7 +44,7 @@ Route::get('/api/countries/resolve/{code}', function (string $code) {
Route::get('/api/countries/{code}/subdivisions', function (string $code) {
$normalised = strtoupper(trim($code));
$country = \Illuminate\Support\Facades\DB::table('countries')
$country = DB::table('countries')
->whereRaw('UPPER(alpha2) = ?', [$normalised])
->orWhereRaw('UPPER(alpha3) = ?', [$normalised])
->orWhere('numeric', $normalised)
@@ -51,7 +52,7 @@ Route::get('/api/countries/{code}/subdivisions', function (string $code) {
abort_if($country === null, 404);
$subdivisions = \Illuminate\Support\Facades\DB::table('country_subdivisions')
$subdivisions = DB::table('country_subdivisions')
->where('country_id', $country->id)
->orderBy('sort_order')
->orderBy('name')