Laravel Pro Tips
💡 You can define HTTP macro to configure common request paths and headers when interacting with services throughout your application.
#laravel #laravelphp #laraveltips #laraveltricks #laravelupdates #laravelfeatures
Laravel Updates | Tips and Tricks
👉 A #laravel HTTP Client #CheatSheet
⚡️Some of the methods you can use before you send your request 🔥
Aaron Lumsden 🎉 | Indie Hacker Dev
🔥 #Laravel Tip: When communicating with third-party APIs via Laravel's HTTP client, consider adding a user agent that identifies your app. That way, if there's a problem, the API owner can identify you (via their HTTP logs) and contact you (instead of blocking you).
Matt Kingshott 🏝
Laravel Tip 💡 Use Laravel's retry helper when dealing with an unstable API. For example, retry a request three times and wait one second between every retry.
Handling HTTP caching is a little tricky in #Laravel because it's can be a two-step process (eg. on pages that need to make lots of external API/database calls).
Here's a basic example. I've got another package in the works that will make it much easier! https://t.co/tuuwtNH3IL
🔥 I keep finding these sweet conveniences in Laravel’s HTTP client. For instance, there’s a `withToken` method to attach the `Authorization` header to a request.
So much nice than having to add it manually. 🥰
Kai Sassnowski 🥔
🚀If you're making an HTTP request in Laravel, you can dump the request.
This can be really useful for debugging when making API calls from your application.
🔥 #Laravel Tip: Need to make more than one HTTP request e.g. to one or more sites? You might think about running them concurrently to improve performance. The HTTP client's 'pool' method makes this a trivial exercise.
May 3rd, 2022
20 Useful Laravel Tips
Read 20 useful tips that you can use in your Laravel projects. These tips have been built using my best-performing tweets on Twitter and cover databases, standards, testing, Artisan commands, and much more.