Laravel Repository Design Pattern | Laravel Advanced | Repository Pattern [HINDI]
HTML-код
- Опубликовано: 13 апр 2022
- A repository is a separation between a domain and a persistent layer. The repository provides a collection interface to access data stored in a database, file system, or external service. Data is returned in the form of objects.
The main idea to use Repository Pattern in a Laravel application is to create a bridge between models and controllers. In other words, to decouple the hard dependencies of models from the controllers. The model should not be responsible for communicating with or extracting data from the database. A model should be an object that represents a given table/document/object or any other type in our data structure, and this should be its sole responsibility. Therefore, to keep your Laravel code clean and safe, it is worth using repositories to separate the responsibility for which the model should never be responsible.
Laravel Repository Design Pattern | Laravel Advanced | Repository Pattern
Our Playlists:
Laravel 9:
• Laravel 9
Nuxt Js
• NuxtJS
Laravel And Vuejs
• Laravel And Vuejs
Laravel Notifications:
• Laravel Notification
Laravel And React Js
• Laravel ReactJs
Laravel Interview Questions And Answers:
• Laravel Interview Ques...
Laravel User Management System:
• Laravel User Managemen...
Laravel Multi Auth System
• Laravel Multi Auth System
Follow us:
YoutTube: / ajayyadavexpo
Instagram: / ajayyadavexpo
Twitter : / ajayyadavexpo
Linkedin : / ajayyadavexpo
Github : github.com/ajayyadavexpo
Please subscribe to my channel and share the video with your friends.
#laravelRepositoryPattern #RepostoryPattern #LaravelAdvanced
Sir aap ne to ekdam easy kar diya aur aapka explanation bahut hi excellent hai
Tha k you sir , it's very helpful to understand the repository structure in laravel
thanks for watching !!!
do you have any videos for factory design pattern, builder and strategy pattern?
Very important part
When to use service, model, repository, action class in lumen laravel?
Great sir
Thanku ❤
Hi i have a small question can we do same logic under contract instead of making repository which one is more powerful please suggest
Sir Good job 🙏
And write with solid thanks for tutorials
Excellent man Keep it up
Thanks, will do!
Thank you so much sir, I was looking for this same to do , I asked my seniors but they shown zero interest to tell me. So, Thanks !
So nice of you
@@ajay-yadav Brother, I have a query, I followed you and really learned, here, we can do all this stuff without Interface, So Should we define Interface ?
@@Pramodsharma-uz8ix yes we should define interfaces.. It hides the details of data access logic from business logic..
Nice video sir please make videos on all design pattern used by laravel
Yes, sure
sir make a video on admin pannel
Why you inject category repositoryInterface in constructor instead of injecting category repository
Excellent thanks teach us other too thanks
Thank you, I will
Great video sir...how to install React inside Laravel..please make a video...This is my humble request to you
Your humble request is accepted 😊👍
@@ajay-yadav Next video sir...
Please Make a video on Module system in Laravel or HMVC
Thanks for this video👋
sure , thank you - great topic
@@ajay-yadav thanks
thanks for sharing good video, please make a complete video on all design pattern asap.
thanks @Vikas I will try my best
@@ajay-yadav you are the genius dost
bhai rona aa rha h 👍 thanks brother
@@ajay-yadav Bhai ache video banaye hai isliye bol diya
Please make a video front and admin login using Laravel auth
Sir kya category, Blog, product etc ke liye alag - alag repository make Krna padhega
ek base interface common bna skte ho ... but han sbhi ke liye alg alg rkho
It's very completed process,please follow eloquent,it is easy to use .
Sir class direct q use nhi kar sakty ? Interface sey bind karna q zarori hai ?
Good question @Hammad Hasan
You can't inject directly an interface. Laravel's service container must know how to resolve that interface, (Which means you can't do a new CategoryRepositoryInterface() ) that's why you need the binding in your service provider. -
make more videos regarding design patterns in laravel 9
sure amit soon
you are smart.
😳
Why cant we use UPDATE & STORE Method in Repository ?
it's up to you, change the function name
overall video is excellent but voice is not good plz fix the audio thank you
thanks for your valuable feedback, will work on it
This is so complicated than normal process! Why someone should follow such complicated process?
Yes vai. This is very complicated. Many companies are follow this pattern. Some people say that this pattern very reuseful.
A key benefit of the Repository pattern is that it allows us to use the Principle of Dependency Inversion (or code to abstractions, not concretions). This makes our code more robust to changes, such as if a decision was made later on to switch to a data source that isn't supported by Eloquent. And it makes it easier to test your application logic. Remember that unit tests only test your code, not infrastructure, so the repository abstractions make it easier to achieve that goal
Bhai apki video no daught achi hai voice qulity sahi nahi h
this is same like services classes.
Hello I am facing an error when using JavaScript and dynamically created button as per row using for loop. And assign I'd to button dynamically but when I try access that I'd so that not displaying.
Can u guide or can share ur email so that I share u exact code.
ajayyadavexpo@gmail.com