refactor observers, fix policy, add feature tests
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user