I've built several Laravel systems but all have been backend (admin) based (never customer facing) so I've known what my routes are and what they're doing etc.
I'm now doing a system with a page builder for customer-facing pages which is coming along nicely but I'm unsure how to handle what are the equivalent of Wordpress CPTs in Laravel's routes.
Basically, when creating a page you can choose a 'type' which is currently 'page', 'news', 'case study', 'product' etc. However, whilst I can hardcode the routes in no problem, I was thinking of enabling the user to add their own 'CPTs', such as a 'testimonial' or 'media' page etc.
I'm stumped - if I were to enable users to do this, each time they create a new 'CPT' would I need to go in and hardcode the route to recognise 'mydomain.com/testimonial/page-slug-here'?
Is there a way around this, perhaps by 'reserving' the other routes used in the system or using some sort of 'wildcard'?
This is the first time I've had to deal with 'dynamic' routes and a customer-facing system so any suggestions on the best way to do this would be appreciated!