b6934e1fb5
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.
20 lines
383 B
PHP
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();
|
|
}
|
|
}
|