Suman Shrestha

Snippets | Suman Shrestha

Code Snippets & Insights

3 articles

The Defer Helper

Use the defer() helper to execute code after the HTTP response has been sent to the user, without setting up a queue.

The Once Helper for Memoization

Use the new once() helper in Laravel 11 to easily cache the result of a usage for the duration of the request.

Atomic Locks in Laravel

Prevent race conditions and ensure only one instance of a task runs at a time using Laravel's Atomic Locks.

-

Need one on one help with Laravel and its ecosystem?

Talk to me now if you need my help. Click here