What's the difference between defer(Closure) and dispatch(Closure)->afterResponse()?
@DianaWebdevКүн бұрын
The `defer()` feature is exciting, but `when()` makes my inner code monk SO happy. I always hated "inline" @if in blade files.
@LaravelPHPКүн бұрын
Glad we could help your inner code monk 🙌 (Christoph)
@mh58542 күн бұрын
i still prefer using the if directive rather than using that when directive, simply it is more clear and informative
@LaravelPHP2 күн бұрын
Sure, whatever fits you better 👍 (Christoph)
@shaz3e2 күн бұрын
What if we just use defer instead jobs for example sending email and email gets failed
@smokeyoak2 күн бұрын
You should be able to catch Mail::failures in the deferred action and respond appropriately when that happens. If you need to make sure that the mail is sent before returning the response, it might not be a good use case for defer
@berthojoris2 күн бұрын
`When Helper` Is great 🤟
@LaravelPHP2 күн бұрын
Glad you like it. (Christoph)
@websdev4532Күн бұрын
is defer() has any time limit? forexample I have to send data to multiple API's and it takes more than 1 minute, would it work with defer or I will get timeout error ?
@incoming-th2 күн бұрын
It would be nice if we could avoid using ->value everywhere in the app for Enum, but that still an improvement. Also the defer() is one of the biggest surprised during Laracon and I can see this used for background audit on users actions, for something more complex and intensive jobs are still the way to go, also is dispatchAfterResponse() using defer() ?
@sajadtorkamani939921 сағат бұрын
Awesome features 🔥
@cydoentis2 күн бұрын
What theme are we using in this video :O, I gotta ask the important questions
@valpuia604Күн бұрын
Any plan to put out optional parameter to confirmed rule in docs
@LaravelPHPКүн бұрын
is planned 👍 (Christoph)
@JafarH-ip5qhКүн бұрын
🎉
@mh58542 күн бұрын
That defer helper is not clear, need more info
@lestratege42 күн бұрын
plz do a tutorial for auth with cookie sessions... i always get unauthenticated or token missmatch plz
@jasonennis49052 күн бұрын
What about cache::flexible ?
@LaravelPHP2 күн бұрын
There were just too many new things to cover, you wanna learn about that too? (Christoph)
@melekRebai2 күн бұрын
One thing that is unclear, what are the limits of the new defer helper function (time limit maybe), and what are the requirements (apache, nginx ...?)
@LaravelPHPКүн бұрын
It should work on all platforms, no requirements (Christoph)
@AntoineGeorgiev2 күн бұрын
when 😆
@urthamusic2 күн бұрын
defer() is not working on Windows. Very sad. Thanks for your video :)
@ajzack9832 күн бұрын
Yes windows is very sad lol. Use WSL at least
@DougLopes17 сағат бұрын
It doesn't work very well in linux too. The view appears fast, but the request is not finished until the closure it's done.