@myregistration I responded thinking it was a method as specified in the comment in your actual code
Route::prefix('organization/{organization:slug}')->group(function () {
// Filament routes
});
Try to integrate Filament panels with route parameters, you'll typically use the standard Laravel routing methods along with Filament's routes.
use Filament\Panel;
Route::prefix('organization/{organization:slug}')->group(function () {
Panel::register(MyPanel::class) //your Panel Class goes here
->path('/dashboard') // Set the path for your panel
->name('admin.dashboard'); // Set the panel name
});
or try understanding with these steps
a. Define Your Route with Parameters:
Route::get('/panel/{id}', [PanelController::class, 'show'])->name('panel.show');
b. Create a Filament Panel:
Create a Filament panel using the artisan command or by manually creating the panel class. Make sure the panel class extends Filament\Panel and implements Filament\Panel\Contracts\CanInteractWithModel.
c. Implement Route Parameter Usage in the Panel:
use Illuminate\Http\Request;
public function view(Request $request)
{
$id = $request->route('id');
// Use $id to fetch data or perform any logic based on the route parameter
return view('filament.panels.panel-name', ['id' => $id]);
}
d. Link to the Panel Route with Parameters:
<a href="{{ route('panel.show', ['id' => $someId]) }}">Show Panel</a>