vendredi 10 juin 2016

Optimization suggestions for laravel routing

I'm creating a Laravel 5.1 application that lists products on pages. Now each product on the database has the url of the product detail page. I have done a method that exports all those urls and convert's them to laravel routes, and the routes are written into a file and included on the laravel routing. I have done that on that way in order to be able to optimize the routing using laravel's routes:cache command. Now my question in fact is about optimization, which way would be better, to have a file with all routes, let's say 100K routes or to have a single entrance point that compares the route in question inside the database and return the respective product.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire