Collapse Sidebar by Default in Mobile
- Published: 20 Jun 2024 Updated: 07 Jul 2024
Hi for those maybe who need this one, so, I'm facing this issue when I'm using tour plugin by jibay-mcs-tour.
when it comes to mobile, the sidebar by default opens so that makes the tour doesn't work as well, here's what I do to solve that problem.
1. Create a new custom JS, you can name it whatever you want, I will name it custom.js
2. Register the javascript via AppServiceProvider.php inside the boot function
3. Save and run `artisan filament:asset` to push the script that we made earlier
That's all guys, if you find a better way, share it with us also ✌️
Thank you.
Related Tricks:
how to use an action as a headerAction or as a table row action without code duplication
add any link or actions to the topbar
How to Apply Authorization on Create Option Action for Select Field
how to use a resource with multiple models
when you have a lot of resources, let your users search for what they looking for int he sidebar.