refactor ClientWidgetContactController and ClientWidgetPageReferenceListController; replace caching logic with action classes for widget data retrieval, enhancing code clarity and maintainability

This commit is contained in:
F4ilji
2025-07-21 22:45:55 +05:00
parent 3cac482409
commit eac29d8d1c
6 changed files with 104 additions and 30 deletions
@@ -0,0 +1,18 @@
<?php
namespace App\Containers\Widget\Tasks;
use App\Containers\Widget\Models\PageReferenceList;
use App\Ship\Exceptions\NotFoundException;
class FindPageReferenceListBySlugTask
{
public function run(string $slug): PageReferenceList
{
$pageReferenceList = PageReferenceList::query()
->where('slug', $slug)
->firstOrFail();
return $pageReferenceList;
}
}