Support the ongoing development of → Architecture
Last updated 2 years ago.
moderator Solution

See it as the same way the DispatchesJobs and the ValidatesRequests traits work. It adds behavior to each controller so we can send messages to the user when the next request is resolved. This is an ideal use case for a trait.

If you look at the actual trait you'll see that we're indeed adding the message to the session. But we're hiding it behind convenient helper methods.


I see, got ya, thank you.


Sign in to participate in this thread!


Your banner here too?

Amin amin Joined 5 May 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.