Пропустить навигацию
This is exactly how all my laravel controllers are coded. 🧼
0:00 / 1:28

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

nunomaduro

@enunomaduro66 тыс. подписчиков

Открыть в X
326 отметок «Нравится»СкачатьОригинальный пост

17 658 просмотров

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

10 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Michael Dyrynda

    @michaeldyrynda

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

    3 отметки «Нравится»

  • Фото профиля Nuno Maduro

    @enunomaduro

    🧼

    1 отметка «Нравится»

  • Фото профиля Ludovic Guénet ☄️

    @LaravelJutsu

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

    2 отметки «Нравится»

  • Фото профиля Nuno Maduro

    @enunomaduro

    🫡

  • Фото профиля Newton Job

    @_newtonjob

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

    2 отметки «Нравится»

  • Фото профиля Alvin 🇵🇭

    @nivlamojepse

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

    1 отметка «Нравится»

  • Фото профиля d3adR1nger

    @DevThanos

    These snippets are gold.

    1 отметка «Нравится»

  • Фото профиля Lee Overy

    @leeovery

    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 😂

    1 отметка «Нравится»

  • Фото профиля Estéban 🦋 @soubiran.dev

    @soubiran_

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

  • Фото профиля Nuno Maduro

    @enunomaduro

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

    1 отметка «Нравится»