正在加载视频...

视频加载失败

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

17,658 次观看 • 1 年前 •via X (Twitter)

10 条评论

Michael Dyrynda 的头像
Michael Dyrynda1 年前

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

Nuno Maduro 的头像
Nuno Maduro1 年前

🧼

Ludovic Guénet ☄️ 的头像
Ludovic Guénet ☄️1 年前

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

Nuno Maduro 的头像
Nuno Maduro1 年前

🫡

Newton Job 的头像
Newton Job1 年前

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 🇵🇭 的头像
Alvin 🇵🇭1 年前

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 的头像
d3adR1nger1 年前

These snippets are gold.

Lee Overy 的头像
Lee Overy1 年前

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 的头像
Estéban 🦋 @soubiran.dev1 年前

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

Nuno Maduro 的头像
Nuno Maduro1 年前

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

相关视频

We all know what this is 😩🧼
0:21

Sensitive content

We all know what this is 😩🧼

RawMedia 🥩

85,927 次观看 • 5 个月前