Files
famous-ly4-ev/app-modules/routing/src/Observers/PopularRouteObserver.php
T
Nyan Lin Paing b6934e1fb5 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.
2026-08-30 14:52:39 +07:00

20 lines
383 B
PHP

<?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();
}
}