Dynamic Page

Hey, I want to have a dynamic page where record of the user base on the route. like /user/2 only show the post of user where id is 2. I added the navigation group item on panel provider
$posts = Post::all()->pluck('name', 'id');

$postsNavItem = [];

foreach ($posts as $id => $post) {
$postsNavItem[] = NavigationItem::make($post)
->group('Posts')
->sort($id);
}

return $panel
...
->navigationItems($postsNavItem);
$posts = Post::all()->pluck('name', 'id');

$postsNavItem = [];

foreach ($posts as $id => $post) {
$postsNavItem[] = NavigationItem::make($post)
->group('Posts')
->sort($id);
}

return $panel
...
->navigationItems($postsNavItem);
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server