refactor observers, fix policy, add feature tests

This commit is contained in:
2026-05-07 05:31:22 +07:00
parent f5615038b4
commit 8cb9c0eb96
9 changed files with 216 additions and 36 deletions
@@ -41,6 +41,8 @@ class PublicController extends Controller
{
abort_if($activity->status !== 'approved', 404);
$activity->load('creator', 'participants');
return view('public.kegiatan-detail', compact('activity'));
}
@@ -55,6 +57,8 @@ class PublicController extends Controller
{
abort_if($post->status !== 'published' || ! $post->published_at, 404);
$post->load('author');
return view('public.blog-detail', compact('post'));
}