Laravel dependency inject - what is it and how to use it

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

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

  • @gayathirtechnologies
    @gayathirtechnologies 3 месяца назад +1

    Given so much knowledge thank you

  • @muhammadbasil8698
    @muhammadbasil8698 7 месяцев назад +1

    Smartly explained !!

  • @akSingh_120
    @akSingh_120 Год назад

    nice concept

  • @channaveerhakari7319
    @channaveerhakari7319 3 года назад +1

    Hey hi awesome content again. If possible could you please do couple of videos on Testing, Test Doubles, Laravel Roles and Permissions, Security.
    I know it's lot of them, just a kind of suggestions for your upcoming videos. And hope many of them expects them too

    • @amitavroydev
      @amitavroydev  3 года назад

      I have a big series on test driven development. Do check that out.
      For the rest of the things, sure I will consider your points.

    • @channaveerhakari7319
      @channaveerhakari7319 3 года назад +1

      @@amitavroydev yes seen your TDD series and really love them. Big fan of your articles too.

    • @amitavroydev
      @amitavroydev  3 года назад

      Thanks buddy. Really appreciate

  • @muhammadshoaib4164
    @muhammadshoaib4164 3 года назад

    Hi, great video, what tool are you using for a local server in windows?

  • @magbenyo
    @magbenyo 11 месяцев назад

    What VS theme are you using

  • @ABHISHEKKUMAR-ne3rk
    @ABHISHEKKUMAR-ne3rk 3 года назад +2

    Pls, make video how we create Saas based application in laravel

    • @amitavroydev
      @amitavroydev  3 года назад +1

      It's a big thing. Any specific area you have questions on?

    • @ABHISHEKKUMAR-ne3rk
      @ABHISHEKKUMAR-ne3rk 3 года назад +1

      @@amitavroydev plan ,pay or subscription.i.e basic Saas introduction with plan, price, subscription.

    • @amitavroydev
      @amitavroydev  3 года назад

      Hmm, I already have a video on razor pay implementation by the way

  • @sho-ep6gy
    @sho-ep6gy 2 года назад +1

    sorry but the definition of DI using the invoke method is wrong, invoke method needs a Request parameter, that's not DI, DI is when the whole class depend upon another module to be able to execute its logic, and there are two ways to achieve this, one is what you mentioned about constructor injection and other ways are by for example having a method to inject the dependencies (setter injection)

    • @amitavroydev
      @amitavroydev  2 года назад

      Is it so?
      So, if I have a route which is calling a single method class and we are loading the request class then what will it be?
      It's possible that my concept on that can be wrong. But if that's the case then I need to understand so that I can correct myself.
      Thanks for pointing that out.

    • @sho-ep6gy
      @sho-ep6gy 2 года назад

      @@amitavroydev __invokes are still methods, like any other method, and methods may or may not require parameters which is not the same as DI, but there are some cases as I explained in my previous comment where you inject dependencies through setters (methods), but these methods are usually used by frameworks to inject dependencies on runtime or compilation