Laravel Advanced: The Manager Pattern

Поділитися
Вставка
  • Опубліковано 12 лис 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

  • @irfanullah9375
    @irfanullah9375 10 місяців тому

    ❤ Interesting

  • @codewithexperts
    @codewithexperts 6 місяців тому

    create video on laravel intermediate to advanced

  • @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!