🔥 Weekly thread #42 of 2021

🔥 This week’s code tips for Laravel developers

You can make the Http client throw exceptions to terminate execution on any received errors

1

🔥 You can make the Http client throw exceptions to terminate execution on any received errors

You can make the Http client throw exceptions to terminate execution on any received errors

💡 By default, the @laravelphp HTTP client doesn't throw exceptions on client and server errors.

However, you can make it do that by using the 'throw' method, and this method is chainable 🔥

Documentation: https://laravel.com/docs/8.x/http-client#throwing-exceptions

#Laravel #PHP #webdev #webdevelopment

We're writing a book, you can get it for free here.