Laravel Design Patterns: Strategy with Services Example

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.พ. 2025

ความคิดเห็น •

  • @AbdulMoizDev
    @AbdulMoizDev 5 หลายเดือนก่อน +4

    I started using the service classes pattern by watching your video and it really helped me to organise the code and increase code reusability

  • @zakariajawas
    @zakariajawas 5 หลายเดือนก่อน +1

    Great as usual, thank you

  • @rehmanghani6726
    @rehmanghani6726 5 หลายเดือนก่อน +1

    Nice video ❤

  • @ryiad2010
    @ryiad2010 5 หลายเดือนก่อน

    very useful thank you

  • @loremipsum-tk2pu
    @loremipsum-tk2pu 5 หลายเดือนก่อน +3

    Is there a reason to bring in the services through typehinting them? In my case, I don't need an instance of the service so I make all my service methods static and use it like you would use a facade.

    • @LaravelDaily
      @LaravelDaily  5 หลายเดือนก่อน +2

      Both are possible, personal preference in most cases.

    • @ParadoxKarl44
      @ParadoxKarl44 5 หลายเดือนก่อน +1

      The main reason to use dependancy injection over static methods is that it's significantly easier to test (using static methods makes it difficult to manipulate and mock sub-dependancies). Facades do have some built in functionality that somewhat mitigates these difficulties.

  • @muhibahmed1116
    @muhibahmed1116 5 หลายเดือนก่อน

    Nice

  • @iconicae8814
    @iconicae8814 5 หลายเดือนก่อน +1

    I wonder if i make the paypal integration or the facebook or twitter integration , how should the people working with me use this feature although it's linked by my credentials in the env file for example?

    • @LaravelDaily
      @LaravelDaily  5 หลายเดือนก่อน +2

      Depends on the API of specific tool, but usually they should set up specific testing credentials to put on their env file and/or staging.

    • @iconicae8814
      @iconicae8814 5 หลายเดือนก่อน +1

      @@LaravelDaily thanks so much sir

  • @eslammostafa1247
    @eslammostafa1247 5 หลายเดือนก่อน

    Hello mr Povilas, do you have a tutorial on Laravel daily covering caching somehow in-depth?

    • @LaravelDaily
      @LaravelDaily  5 หลายเดือนก่อน +1

      Depends on what kind of caching, we have these tutorials about it: laraveldaily.com/tag/cache?source=search

    • @eslammostafa1247
      @eslammostafa1247 5 หลายเดือนก่อน

      @@LaravelDaily Thank you :)

  • @k.surendhar964
    @k.surendhar964 5 หลายเดือนก่อน

    ❤❤❤

  • @codesmiles_
    @codesmiles_ 5 หลายเดือนก่อน

    My boss like to use the word providers for external services and services for handling business logic

    • @LaravelDaily
      @LaravelDaily  5 หลายเดือนก่อน +2

      Service PROVIDER is another misunderstood word. A video about that one is also coming.

  • @kirayamato6128
    @kirayamato6128 5 หลายเดือนก่อน

    why use interface to the invoke? i don't understand why?? care to explain? this is new to me. for what I've experienced interface should use as implements, right?

    • @LaravelDaily
      @LaravelDaily  5 หลายเดือนก่อน +1

      Not sure which part you didn't understand, maybe the full course would explain it to you?
      So yeah, interface is the set of rules, two classes implement that interface, then the controller accepts the interface as parameter, and then service provider decided which class is chosen from that interface classes.

  • @wowdesigns7436
    @wowdesigns7436 5 หลายเดือนก่อน +1

    🤦‍♂😁 Noticing outdated Chrome in your tutorial! Isn't it bothering you? Just update Chrome already! 🤷‍♂

    • @LaravelDaily
      @LaravelDaily  5 หลายเดือนก่อน +4

      No, not bothering me. I have more important stuff to think about.