commit de armazens
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-04 09:40:26 +02:00
parent e753f7a0a4
commit 63d20b10fc
245 changed files with 10847 additions and 230 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Services;
use App\Models\Supplier;
use Illuminate\Database\Eloquent\Builder;
class SupplierGeography
{
/** Current supplier registration only; never infer geography from address text or evaluation snapshots.
* @return Builder<Supplier>
*/
public function matching(string $location): Builder
{
$geography = app(AdministrativeGeography::class);
abort_unless($geography->enabled(), 503);
return Supplier::query()->where('geography_reference->country', 'MZ')
->where('geography_reference->catalogue', $geography->catalogue()['manifest']['source_sha256'])
->whereIn('geography_reference->record_id', $geography->descendants($location));
}
}