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

Комментарии • 55

  • @santoshrauniyar5286
    @santoshrauniyar5286 29 дней назад

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

  • @ushayadav6401
    @ushayadav6401 5 месяцев назад

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

    • @ajay-yadav
      @ajay-yadav  4 месяца назад

      thanks for watching !!!

  • @amitleuva8739
    @amitleuva8739 Год назад +2

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

  • @VIKASKumar-dg5vb
    @VIKASKumar-dg5vb 2 года назад

    Very important part

  • @asok1111
    @asok1111 2 года назад +1

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

  • @AkhileshYadav-lv3kh
    @AkhileshYadav-lv3kh 2 года назад

    Great sir

  • @muhammadirfan8623
    @muhammadirfan8623 2 года назад

    Thanku ❤

  • @manzoorahmed350
    @manzoorahmed350 3 месяца назад

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

  • @sureshkukumati6526
    @sureshkukumati6526 3 месяца назад

    Sir Good job 🙏

  • @dilmurod9820
    @dilmurod9820 2 года назад

    And write with solid thanks for tutorials

  • @moazzamali3254
    @moazzamali3254 2 года назад

    Excellent man Keep it up

  • @Pramodsharma-uz8ix
    @Pramodsharma-uz8ix Год назад

    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  Год назад +1

      So nice of you

    • @Pramodsharma-uz8ix
      @Pramodsharma-uz8ix Год назад

      @@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  Год назад

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

  • @piyushshyam473
    @piyushshyam473 Год назад

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

  • @muhammadzeeshan6788
    @muhammadzeeshan6788 Год назад

    sir make a video on admin pannel

  • @amitsolanki9363
    @amitsolanki9363 4 месяца назад

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

  • @dilmurod9820
    @dilmurod9820 2 года назад

    Excellent thanks teach us other too thanks

  • @souravsaha1561
    @souravsaha1561 2 года назад

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

    • @ajay-yadav
      @ajay-yadav  2 года назад +1

      Your humble request is accepted 😊👍

    • @souravsaha1561
      @souravsaha1561 2 года назад

      @@ajay-yadav Next video sir...

  • @soumenmajhi585
    @soumenmajhi585 2 года назад

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

  • @Vikaskumar-ur5di
    @Vikaskumar-ur5di Год назад

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

    • @ajay-yadav
      @ajay-yadav  Год назад

      thanks @Vikas I will try my best

    • @Vikaskumar-ur5di
      @Vikaskumar-ur5di Год назад

      @@ajay-yadav you are the genius dost

    • @ajay-yadav
      @ajay-yadav  Год назад +1

      bhai rona aa rha h 👍 thanks brother

    • @Vikaskumar-ur5di
      @Vikaskumar-ur5di Год назад

      @@ajay-yadav Bhai ache video banaye hai isliye bol diya

    • @Vikaskumar-ur5di
      @Vikaskumar-ur5di Год назад

      Please make a video front and admin login using Laravel auth

  • @AV-Technology45
    @AV-Technology45 Год назад

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

    • @ajay-yadav
      @ajay-yadav  Год назад +1

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

  • @ameetballa3146
    @ameetballa3146 Год назад

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

  • @hammadhasan7555
    @hammadhasan7555 2 года назад

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

    • @ajay-yadav
      @ajay-yadav  2 года назад

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

  • @amitdev1485
    @amitdev1485 Год назад

    make more videos regarding design patterns in laravel 9

  • @sparkengineeringpc-2174
    @sparkengineeringpc-2174 Год назад

    you are smart.

  • @aarafc.8591
    @aarafc.8591 Год назад

    Why cant we use UPDATE & STORE Method in Repository ?

    • @ajay-yadav
      @ajay-yadav  Год назад +2

      it's up to you, change the function name

  • @zeeshanalamgir7829
    @zeeshanalamgir7829 2 года назад

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

    • @ajay-yadav
      @ajay-yadav  2 года назад

      thanks for your valuable feedback, will work on it

  • @shahriarmahmudshahed
    @shahriarmahmudshahed 2 года назад +3

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

    • @nilanjanchakraborty2694
      @nilanjanchakraborty2694 2 года назад

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

    • @ajay-yadav
      @ajay-yadav  2 года назад +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

  • @parassharma7370
    @parassharma7370 Месяц назад

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

  • @samiullah0011
    @samiullah0011 Год назад

    this is same like services classes.

  • @vishvish24
    @vishvish24 2 года назад

    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.