This helped me a lot. I still haven't fully grasped when to use state vs. just models like you showed here. But this helped me see how events can be decoupled from state. Thank you!
You are good at explaining! Really nice to watch. Hopefully you will be uploading frequently in the future. You can maybe make an video about every feature of Laravel. Like when to use observers, services etc
Chris! This was such a chill pitch and it really resonated with me. Already wishing I would have written my last side project with Verbs. Maybe the next one!
I agree with Josh's comment - this paints a nice picture of when to fire events and the upside of event sourcing. In my experience, when I'm trying to event source a particular feature, the biggest hurdle for me has been understanding how to use the state and models to store data as well as represent that data in the UI (and then updating/interacting with that data). And in Livewire, how to make it quick/snappy with Verbs.
@@hayden_ellis yeah, I’m gonna try to make another video on state vs eloquent models. As for Livewire, that’s less my area of expertise. But I know Josh Hanley has done some talks about that-might want to look them up.
The upside of events over actions is that the event itself is stored in the db, rather than just the outcome of the event. If you’re already using the actions pattern, it’s relatively easy to switch to events, but it’s definitely work. Only you can decide if it’s worth it.
@@cmorrell it's not possible to have a trait for an action like "asVerb"? that way you don't have to change too much - or is that not possible based on how Verbs package works?
That would be very cool! I’ve thought about it the other way-could Verbs work be routed to/etc like how Laravel-Actions works, but I never thought about it the other way around. I’ll have to tinker a bit to see what’s possible, but it’s a great idea!
Great one 👏
This helped me a lot. I still haven't fully grasped when to use state vs. just models like you showed here. But this helped me see how events can be decoupled from state.
Thank you!
@@joshcirre I’ll see about making another video on State some time soon!
You are good at explaining! Really nice to watch. Hopefully you will be uploading frequently in the future. You can maybe make an video about every feature of Laravel. Like when to use observers, services etc
great video! thanks for this and for verbs. 🙌
@@nunomaduro thanks for checking it out!
Chris! This was such a chill pitch and it really resonated with me. Already wishing I would have written my last side project with Verbs. Maybe the next one!
@@BenHolmen thanks Ben!
I agree with Josh's comment - this paints a nice picture of when to fire events and the upside of event sourcing.
In my experience, when I'm trying to event source a particular feature, the biggest hurdle for me has been understanding how to use the state and models to store data as well as represent that data in the UI (and then updating/interacting with that data). And in Livewire, how to make it quick/snappy with Verbs.
@@hayden_ellis yeah, I’m gonna try to make another video on state vs eloquent models. As for Livewire, that’s less my area of expertise. But I know Josh Hanley has done some talks about that-might want to look them up.
great video, Chris!
one day, my hair will also be this beautiful
great video!!!!
Hi Chris, what's the app you're using at 11:43?
@@andrewpeacock5107 that’s PhpStorm with the amazing Laravel IDEA plugin. It makes working with Laravel *so* good!
@@cmorrellAh, thanks.
why can't this be done using actions instead? if we already have a bunch of actions I'd now have to move those into Verb Events instead?
The upside of events over actions is that the event itself is stored in the db, rather than just the outcome of the event. If you’re already using the actions pattern, it’s relatively easy to switch to events, but it’s definitely work. Only you can decide if it’s worth it.
@@cmorrell it's not possible to have a trait for an action like "asVerb"? that way you don't have to change too much - or is that not possible based on how Verbs package works?
That would be very cool! I’ve thought about it the other way-could Verbs work be routed to/etc like how Laravel-Actions works, but I never thought about it the other way around. I’ll have to tinker a bit to see what’s possible, but it’s a great idea!