Загрузка видео...

Не удалось загрузить видео

На главную

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.

Похожие видео