Pass params to a custom page
How can i create route as example chatroom/{room_id} and pass this room id to custom filament page
Solution:Jump to solution
You can use slug in custom page
protected static ?string $slug = 'room/{id}';
public function mount($id): void...
8 Replies
Does your chatroom have a database record and laravel model? If so you can create a filament resource with a view page to do this. Generally the model is loaded into the
record
property on filament classescreate a custom page:
php artisan make:filament-page ChatRoom
override this route in web.php
I tried that but i found that the theme color that i choose has been return to default orange instead the one that i am using in panal
yes it has a modal but its not a resource as it wont fit the app logic
is it another question?
no its same question what i want to say i tried that solution and yea i have a page with a route params and that what i want but i am using primary color #51B78F but at this page it changed to the default Color::Orange of fiament
I think this is another question.. anyway, you can customize the color in your appserviceprovider
https://filamentphp.com/docs/3.x/support/colors#overview
Solution
You can use slug in custom page
protected static ?string $slug = 'room/{id}';
public function mount($id): void
{
dd($id);
}
this worked for me