The Basics of Routing in Laravel | Learn Laravel The Right Way
HTML-код
- Опубликовано: 9 окт 2024
- In this episode of "Learn Laravel The Right Way," we explore Laravel’s Routing system. Learn how Laravel handles HTTP requests and maps them to actions in your application. We'll cover defining routes in web.php, handling multiple request types like GET and POST, using methods like match, any, and redirect, and managing routes using Artisan commands.
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Like the video
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
⭐ Become a Patreon: / programwithgio
THANK YOU!
🛠️ TOOLS & SERVICES I USE
Laracasts - laracasts.com/...
Domains on Namecheap - namecheap.pxf....
Envato Elements - 1.envato.marke...
FULL PLAYLIST - • Learn Laravel The Righ...
LESSON - 10 - RESOURCES
laravel.com/do...
** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
Thank you for your time and efforts to make these amazing videos ! Have you got plans to make videos about a bit more advanced things like rabbitmq, kafka, grpc, static analizers or maybe "learn symfony the right way"?)
Hey Gio, once again a terrific example of your teaching strength!
massive content brought to comprehensive words! Thank you soo much! This will for sure be a video that I will review from time to time whenever I will retry to understand what laravel routes work like.
Thank you 💙💙
Wow, the least part with the cached routes blew my mind. Where I was clearly understanding how composer caches the autoloading in a simple array with key/value pairs, I wonder how such a deep array tree can really speed up the routing. Can you explain or even show how laravel reads from this "array monster" efficiently? I must have missed that in your PHP series but I would possibly end up in a "if/else monster" to bring the routes to action I guess... There must be a really quick soloution, right?
If you open the cached routes file you will see its not just a giant array, it sets compiled routes on the router instance. Then uses that compiled routes to find the appropriate route.
💙💙💙
💙
💗💗💗
💙💙