Using two amazing helpers in Laravel will bring magic results

Using two amazing helpers in Laravel will bring magic results...

In this case, the service will be called and retried (retry). If it stills failing, it will be reported, but the request won't fail (rescue)

1rescue(function () {
2 retry(5, function () {
3 $this->service->callSomething();
4 }, 200);
5});

Tip given by @JuanDMeGon

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 22 courses (477 lessons, total 38 h 20 min)
  • 2 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord