Laravel Repository Design Pattern | Laravel Advanced | Repository Pattern [HINDI]

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • 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

Komentáře • 55

  • @santoshrauniyar5286
    @santoshrauniyar5286 Před měsícem

    Sir aap ne to ekdam easy kar diya aur aapka explanation bahut hi excellent hai

  • @amitleuva8739
    @amitleuva8739 Před 2 lety +2

    do you have any videos for factory design pattern, builder and strategy pattern?

  • @VIKASKumar-dg5vb
    @VIKASKumar-dg5vb Před 2 lety

    Very important part

  • @asok1111
    @asok1111 Před 2 lety +1

    When to use service, model, repository, action class in lumen laravel?

  • @ushayadav6401
    @ushayadav6401 Před 5 měsíci

    Tha k you sir , it's very helpful to understand the repository structure in laravel

  • @muhammadirfan8623
    @muhammadirfan8623 Před 2 lety

    Thanku ❤

  • @AkhileshYadav-lv3kh
    @AkhileshYadav-lv3kh Před 2 lety

    Great sir

  • @sureshkukumati6526
    @sureshkukumati6526 Před 4 měsíci

    Sir Good job 🙏

  • @manzoorahmed350
    @manzoorahmed350 Před 4 měsíci

    Hi i have a small question can we do same logic under contract instead of making repository which one is more powerful please suggest

  • @dilmurod9820
    @dilmurod9820 Před 2 lety

    And write with solid thanks for tutorials

  • @moazzamali3254
    @moazzamali3254 Před 2 lety

    Excellent man Keep it up

  • @piyushshyam473
    @piyushshyam473 Před 2 lety

    Nice video sir please make videos on all design pattern used by laravel

  • @Pramodsharma-uz8ix
    @Pramodsharma-uz8ix Před rokem

    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 !

    • @ajay-yadav
      @ajay-yadav  Před rokem +1

      So nice of you

    • @Pramodsharma-uz8ix
      @Pramodsharma-uz8ix Před rokem

      @@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 ?

    • @ajay-yadav
      @ajay-yadav  Před rokem

      @@Pramodsharma-uz8ix yes we should define interfaces.. It hides the details of data access logic from business logic..

  • @dilmurod9820
    @dilmurod9820 Před 2 lety

    Excellent thanks teach us other too thanks

  • @muhammadzeeshan6788
    @muhammadzeeshan6788 Před rokem

    sir make a video on admin pannel

  • @souravsaha1561
    @souravsaha1561 Před 2 lety

    Great video sir...how to install React inside Laravel..please make a video...This is my humble request to you

  • @soumenmajhi585
    @soumenmajhi585 Před 2 lety

    Please Make a video on Module system in Laravel or HMVC
    Thanks for this video👋

  • @sparkengineeringpc-2174

    you are smart.

  • @amitsolanki9363
    @amitsolanki9363 Před 5 měsíci

    Why you inject category repositoryInterface in constructor instead of injecting category repository

  • @Vikaskumar-ur5di
    @Vikaskumar-ur5di Před rokem

    thanks for sharing good video, please make a complete video on all design pattern asap.

  • @ameetballa3146
    @ameetballa3146 Před rokem

    It's very completed process,please follow eloquent,it is easy to use .

  • @AV-Technology45
    @AV-Technology45 Před rokem

    Sir kya category, Blog, product etc ke liye alag - alag repository make Krna padhega

    • @ajay-yadav
      @ajay-yadav  Před rokem +1

      ek base interface common bna skte ho ... but han sbhi ke liye alg alg rkho

  • @amitdev1485
    @amitdev1485 Před rokem

    make more videos regarding design patterns in laravel 9

  • @hammadhasan7555
    @hammadhasan7555 Před 2 lety

    Sir class direct q use nhi kar sakty ? Interface sey bind karna q zarori hai ?

    • @ajay-yadav
      @ajay-yadav  Před 2 lety

      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. -

  • @aarafc.8591
    @aarafc.8591 Před rokem

    Why cant we use UPDATE & STORE Method in Repository ?

    • @ajay-yadav
      @ajay-yadav  Před rokem +2

      it's up to you, change the function name

  • @zeeshanalamgir7829
    @zeeshanalamgir7829 Před 2 lety

    overall video is excellent but voice is not good plz fix the audio thank you

    • @ajay-yadav
      @ajay-yadav  Před 2 lety

      thanks for your valuable feedback, will work on it

  • @parassharma7370
    @parassharma7370 Před 2 měsíci

    Bhai apki video no daught achi hai voice qulity sahi nahi h

  • @samiullah0011
    @samiullah0011 Před rokem

    this is same like services classes.

  • @shahriarmahmudshahed
    @shahriarmahmudshahed Před 2 lety +3

    This is so complicated than normal process! Why someone should follow such complicated process?

    • @nilanjanchakraborty2694
      @nilanjanchakraborty2694 Před 2 lety

      Yes vai. This is very complicated. Many companies are follow this pattern. Some people say that this pattern very reuseful.

    • @ajay-yadav
      @ajay-yadav  Před 2 lety +1

      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

  • @vishvish24
    @vishvish24 Před 2 lety

    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.