Add Popular Routes

Curated from/to destination pairs for marketing content, editable via a
Filament resource and served publicly (no auth, IP-throttled like CMS
pages) through GET /api/v1/popular-routes. The API response trims each
nested destination down to id/name/mm_name rather than the full catalog
resource.
This commit is contained in:
Nyan Lin Paing
2026-08-30 14:52:39 +07:00
parent 76f75c5581
commit b6934e1fb5
16 changed files with 622 additions and 0 deletions
@@ -0,0 +1,19 @@
<?php
namespace Modules\Routing\Observers;
use Illuminate\Support\Facades\Cache;
use Modules\Routing\Models\PopularRoute;
class PopularRouteObserver
{
public function saved(PopularRoute $popularRoute): void
{
Cache::tags('routes')->flush();
}
public function deleted(PopularRoute $popularRoute): void
{
Cache::tags('routes')->flush();
}
}