Рет қаралды 17,933
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