Laravel Advanced: The Manager Pattern

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 12

  • @devhammed
    @devhammed 10 месяцев назад +3

    Instead of creating a "lib" folder, I usually follow the following folder structure:
    app
    ---- Support
    -------- Contracts - The interfaces (e.g PaymentDriver)
    -------- Managers - The managers (e.g PaymentManager)
    -------- Services - The implementations (e.g StripePaymentDriver)
    And then the users can do something like:
    app(App\Support\Contracts\PaymentDriver::class) or inject into class method that will be resolved from the container.

  • @medilies
    @medilies 10 месяцев назад

    Thank you for the unique content. I often inject the mentioned managers into my classes instead of using the facades.

  • @AhsanKhan89
    @AhsanKhan89 10 месяцев назад +1

    Great video. Thanks for this.

  • @Данил-у9ы8б
    @Данил-у9ы8б 10 месяцев назад +5

    It seems to me that this is just one of the implementations of an abstract factory

  • @hugo-abdou
    @hugo-abdou 10 месяцев назад

    thank you i was searching for this

  • @RudolfBrudersChannel
    @RudolfBrudersChannel 10 месяцев назад

    I have a feeling that there are multiple patterns with different names doing the same thing. Like this manager pattern is the same as strategy pattern and in the end repository pattern (but deals only with data) is that right in you opinion? It all comes down to code against interface

    • @Acadeaio
      @Acadeaio  10 месяцев назад

      yes that is pretty much OOP in a nutshell. At the end of the day, it is the implementation of interface methods that really counts

    • @medilies
      @medilies 10 месяцев назад +2

      The manager pattern feels more like a factory for me

  • @codewithexperts
    @codewithexperts 7 месяцев назад

    create video on laravel intermediate to advanced

  • @irfanullah9375
    @irfanullah9375 10 месяцев назад

    ❤ Interesting

  • @irfanullah9375
    @irfanullah9375 10 месяцев назад

    Please sir make at least one video in week for your viewers

    • @Acadeaio
      @Acadeaio  10 месяцев назад

      I have a lot more lessons in my website, would love to see you there!