How to use a Resource as the main dashboard page?
Hello,
I had a BookingResource with List, Edit and Create pages which works good and the slug is /dashboard/bookings
I wanted to use the BookingResource as a main Dashboard page with the slug / which is accessible using /dashboard
But the issue is my client wants the edit page to be /dashboard/bookings/1/edit instead of /dashboard/1/edit and same for create page.
Please let me know how do I achieve that?
Thank you
2 Replies
I think you need to remove the default dashboard first, then set the resource $slug to empty or "/" then prefix the
getPages
paths manually with the resource previous slug:
didn't test it so it may give 404s but just work around with it
use php artisan route:list
to show the routes after changes@Mohamed Ayaou , thank you this is what I did and it kind of worked, but there are some more issues that I am facing with routing, I will post it here in a bit. Thank you so much.