small fixing, added throw errors in widgets

This commit is contained in:
F4ilji
2025-04-16 15:27:02 +05:00
parent cac319fa81
commit 4fcc41e36e
8 changed files with 14 additions and 13 deletions
@@ -39,7 +39,7 @@ class ClientWidgetPostController extends Controller
return Cache::remember($cacheKey, now()->addMinutes(10), function () use ($id) {
return new PostThumbnailResource(
Post::query()->with('category')->find($id)
Post::query()->with('category')->find($id)->firstOrFail()
);
});
}