refactor ClientProgramController; replace caching logic with action classes for educational program retrieval and enhance code clarity

This commit is contained in:
F4ilji
2025-07-18 15:57:58 +05:00
parent 839d8edfcd
commit 18d1501b67
13 changed files with 404 additions and 155 deletions
@@ -0,0 +1,17 @@
<?php
namespace App\Containers\Education\Tasks;
use App\Ship\Contracts\SeoServiceInterface;
use Illuminate\Support\Facades\Cache;
class GetSeoForCurrentPageTask
{
public function run(SeoServiceInterface $seoPageProvider)
{
$cacheKeySeo = 'education_programs_seo';
return Cache::remember($cacheKeySeo, now()->addDay(), function () use ($seoPageProvider) {
return $seoPageProvider->getSeoForCurrentPage();
});
}
}