Nice video. When using Laravel people seem to forget that Laravel is PHP and end up don't learning OOP or "pure PHP" (mostly because it's kinda easy to use Laravel without much knowledge of PHP). That's something I don't like, even tho I'm learning Laravel I feel the need to learn more about pure PHP and OOP in general
@VadimBesedin3 жыл бұрын
So, as i understand, interface would be good for situation when i need to process payment. One interface and several payment provider classes will be implementing that interface. Also later i will be able to add just another payment provider class and it will work with present interface. Right? It's like USB, you can connect different devices to it, and they will work normally because they implement this USB interface.
@DennisZiolkowski3 жыл бұрын
Thats a good explanation!
@dclindner3 жыл бұрын
Given PHP's limit of extending from only one class, you can't rely on on abstract class, necessarily, if you're providing code to be used by others (such as open source packages). it seems common to define an interface with the methods required, and include a trait that defines those methods. I found this confusing at first, but very helpful to add functionality while working around the one-class extends limit.
@vivekwah3 жыл бұрын
I always have trouble deciding to use either interface or abstract class. Can you please help with this confusion.
@LaravelDaily3 жыл бұрын
Ok adding the interface and abstract classes to the to-do list.
@igoreksazonov3 жыл бұрын
its up to your mind
@vivekwah3 жыл бұрын
@@igoreksazonov yes till now I have been using with that mindset only. But in some good repos I've noticed in some places abstract classes are used and some places interfaces. I only have difference with respect to inheritance. Using abstract class we restrict extend with that class whereas in case of interface there can be many interfaces implemented.
@kaczuszka-dt3 жыл бұрын
Abstract classes do offer some functionality, its not just structure, its the actual functionality with something in already. Interfaces offer only and only description of what the class should be capable of, we cannot give it any real properties or functionality, just a shared set of methods
@Laflamablanca9693 жыл бұрын
The interface for the relationship is pointless. It’s just adding more complexity than is needed.
@flashandrew67723 жыл бұрын
Thanks for the video! It also can be great to see some videos like “middle” level of difficulty. For example something about compare ORM and CQRS. Or maybe some explanation about concepts of DDD
@lucasj.pereira49123 жыл бұрын
Also websockets
@LaravelDaily3 жыл бұрын
For now, I'm focused on practical topics and not theoretical concept comparison. Maybe, when I run out of practical topics, I'll switch to the philosophy on this channel :)
@itone34382 жыл бұрын
thanks
@free2idol1 Жыл бұрын
I noticed that the author used this function to name his file: $filename = uniqid().'_'.Str::random(30) . ".png"; => if you loop through 10 files and using above function to name your file, is there any chance that you would get duplicate file name?
@soniablanche56723 жыл бұрын
interface is the opposite of trait, instead of being provided with methods you have to implement them yourself.
@patricksantino41313 жыл бұрын
You don't say 😂
@eduardoromao Жыл бұрын
Can be named “API”. Its more natural above Interface and Contract. API provides a contract for another service. So contract and API is the same thing, but i’m below API term is already used in hardware and software like a standard, not needing new term like contract.
@Jagdish07243 жыл бұрын
User hasMany(cities) City hasMany(Users), hasMany(Restaurants) Restaurants belongsTo(City) Orders belongsTo(Restaurants) now there are city wise admins. admins can see orders of their assigned cities only with global scopes to other cities records . How to create this relationships.
@ajithlal16883 жыл бұрын
I was struggling to understand interface and this video gave me a better understanding. Thank you ❤️
@L-A-O-S3 жыл бұрын
There are still abstract classes awaiting you, which will only create more confusion. )
@pasizdobrekuce Жыл бұрын
Dependency inversion FTW. 🙌
@linkernetir Жыл бұрын
thank you for the best explanation about contracts in laravel.
@L-A-O-S3 жыл бұрын
Oh, OOP is already here) Cool, well then you should take into account that there are also abstract classes. It's just difficult to rebuild your logic in order to start using all this, although the advantages are immediately felt. And looks like interfaces should be named like gates or politicians? liked the topic of using oop in laravel
@LaravelDaily3 жыл бұрын
Ok adding the interface and abstract classes to the to-do list.
@Bevallalom3 жыл бұрын
Laravel is PHP OOP mostly..... Just saying.
@lma_cristian Жыл бұрын
Now I understand it better.
@deveshmaurya91012 жыл бұрын
Thanks for posting
@damilaresamuelfagbenro18812 жыл бұрын
I have got a question. Is it possible to have the CanCaptureScreenshot binding with both classes in the service provider?
@LaravelDaily2 жыл бұрын
Why would you need that? How would Laravel then know which class to run?
@msdeav3 жыл бұрын
thank you, sir..
@haroldpepete3 жыл бұрын
Thank sr for share
@sale76802 жыл бұрын
Thank u 🙏
@jailsoncarneiro49362 жыл бұрын
Show de Bola!
@glowiever2 жыл бұрын
basically, php is like java in this regards
@fangfang3366 Жыл бұрын
We should say both of them follow OOP, even like c# LOL