Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

17,658 Aufrufe • vor 1 Jahr •via X (Twitter)

10 Kommentare

Profilbild von Michael Dyrynda
Michael Dyryndavor 1 Jahr

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

Profilbild von Nuno Maduro
Nuno Madurovor 1 Jahr

🧼

Profilbild von Ludovic Guénet ☄️
Ludovic Guénet ☄️vor 1 Jahr

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

Profilbild von Nuno Maduro
Nuno Madurovor 1 Jahr

🫡

Profilbild von Newton Job
Newton Jobvor 1 Jahr

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(...)

Profilbild von Alvin 🇵🇭
Alvin 🇵🇭vor 1 Jahr

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

Profilbild von d3adR1nger
d3adR1ngervor 1 Jahr

These snippets are gold.

Profilbild von Lee Overy
Lee Overyvor 1 Jahr

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 😂

Profilbild von Estéban 🦋 @soubiran.dev
Estéban 🦋 @soubiran.devvor 1 Jahr

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

Profilbild von Nuno Maduro
Nuno Madurovor 1 Jahr

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

Ähnliche Videos

We all know what this is 😩🧼
0:21

Sensitive content

We all know what this is 😩🧼

RawMedia 🥩

85,927 Aufrufe • vor 4 Monaten