[Bug]:
Closed this issue · 3 comments
What happened?
Error in documentation route
How to reproduce the bug
when i run the command
php artisan route:list --name=knowledge-base
it contains all the routes. But when i change it to admin in order to use
http://localhost/admin/prologue/getting-started it shows the error and the logout route is missing somehow.
<?php
// config for Guava/KnowledgeBasePanel
return [
'panel' => [
'id' => env('FILAMENT_KB_ID', 'knowledge-base'),
'path' => env('FILAMENT_KB_PATH', 'admin'),
],
'docs-path' => env('FILAMENT_KB_DOCS_PATH', 'docs'),
'model' => \Guava\FilamentKnowledgeBase\Models\FlatfileDocumentation::class,
'cache' => [
'prefix' => env('FILAMENT_KB_CACHE_PREFIX', 'filament_kb_'),
'ttl' => env('FILAMENT_KB_CACHE_TTL', 'forever'),
],
];
Package Version
^1.9
PHP Version
8.3.10
Laravel Version
11.9
Which operating systems does with happen with?
Linux
Notes
No response
well yeah it's a separate panel, you can't use the same path as a different panel
well yeah it's a separate panel, you can't use the same path as a different panel
Oh, gotcha. So the approach is to redirect
/kb/prologue/getting-started
from any /admin
route am i right? why can't we use the same path using the AdminPanelProvider by default?
Yes. Or change the prefix to whatever you like, you just can't use something that already exists. Maybe /admin/kb might work.
Because it made the most sense to me to separate the knowledge base from the rest. If you want to provide documentation within the admin panel, simply use the contextual documentation actions within each resource. You'll still need to have the kb panel, but don't show it if you don't want to.