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.
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.
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?
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?
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.
I started using the service classes pattern by watching your video and it really helped me to organise the code and increase code reusability
Great as usual, thank you
Nice video ❤
very useful thank you
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.
Both are possible, personal preference in most cases.
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.
Nice
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?
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.
@@LaravelDaily thanks so much sir
Hello mr Povilas, do you have a tutorial on Laravel daily covering caching somehow in-depth?
Depends on what kind of caching, we have these tutorials about it: laraveldaily.com/tag/cache?source=search
@@LaravelDaily Thank you :)
❤❤❤
My boss like to use the word providers for external services and services for handling business logic
Service PROVIDER is another misunderstood word. A video about that one is also coming.
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?
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.
🤦♂😁 Noticing outdated Chrome in your tutorial! Isn't it bothering you? Just update Chrome already! 🤷♂
No, not bothering me. I have more important stuff to think about.