0

I'm creating a web application with a front end that heavily uses React components, and I am retrieving data from a Laravel API. I know I can do this using routes in Laravel, but I didn't want to include Laravel into my front-end as well.

When viewing each item, currently, I'd do it like this ./item.php?id=abc021

Instead, I'd want something like ./item/abc021

How would this be possible using vanilla PHP? Also, I am only embedding React components into my HTML page rather than using the template for a single page application - so maybe a solution with that in mind works too.

Divyesh Kanzariya
  • 3,291
  • 3
  • 39
  • 42
boidoh
  • 1
  • Also https://stackoverflow.com/questions/812571/how-to-create-friendly-url-in-php and several others, not to mention multiple resources on other sites. Not a question which needed asking again, really. – ADyson Jul 13 '21 at 06:45

0 Answers0