Loading video...

Video Failed to Load

Go Home

This is exactly how all my laravel controllers are coded. 🧼

17,658 views • 1 year ago •via X (Twitter)

10 Comments

Michael Dyrynda's profile picture
Michael Dyrynda1 year ago

Exactly how I’m structuring my controller method arguments - follow the data through the request lifecycle 🤙🏻

Nuno Maduro's profile picture
Nuno Maduro1 year ago

🧼

Ludovic Guénet ☄️'s profile picture
Ludovic Guénet ☄️1 year ago

naming the Action var $action is one of the smoothest move I learnt from you :D

Nuno Maduro's profile picture
Nuno Maduro1 year ago

🫡

Newton Job's profile picture
Newton Job1 year ago

Joining an existing project and seeing this, the baby in my womb jumps for joy! Only difference is my actions use the `Dispatchable` trait, which lets me do: Action::dispatch(...)

Alvin 🇵🇭's profile picture
Alvin 🇵🇭1 year ago

been using this pattern, business logic should reside inside the action/service class, controller is more cleaner and easy to do a unit test. ✅

d3adR1nger's profile picture
d3adR1nger1 year ago

These snippets are gold.

Lee Overy's profile picture
Lee Overy1 year ago

Only thing I do extra is pass a dto to my actions, rather than an array or any of type of primitive. I also make my actions invokable but that’s personal choice. Well. I guess it all is really 😂

Estéban 🦋 @soubiran.dev's profile picture
Estéban 🦋 @soubiran.dev1 year ago

And do you use both authorization and verification in the form request? Do you create a nit test for this form request?

Nuno Maduro's profile picture
Nuno Maduro1 year ago

Yes, authorization on my form requests. I typically test form requests on my *ControllerTest.

Related Videos

We all know what this is 😩🧼
0:21

Sensitive content

We all know what this is 😩🧼

RawMedia 🥩

85,927 views • 5 months ago