Ep03 - Laravel Service Container and Service Provider

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • Visit acadea.io/learn for more lessons and content!
    Join my newsletter here to get the BEST updates: sendfox.com/ac...
    Support me on: www.buymeacoff...
    Laravel uses Service Container and Provider heavily in its architecture. They are considered as the most important part of the framework design. Let's dive in.
    Series playlist: • Laravel API Server fro...
    ------------
    Subscribe for more: / @acadeaio
    ** Affiliated links
    Use the legendary Git GUI for FREE! You are seriously missing out if you are not using it.
    Gitkraken: www.gitkraken....
    Beautiful designs created instantly to wow your social networks!
    Stencil: getstencil.com?tap_a=9103-1801f8&tap_s=595482-2f5817
    A simple and scalable cloud hosting platform for all developer needs.
    Digital Ocean: m.do.co/c/6ffb...
    Get started on Crypto today. Gets 10% off of all crypto trading fee if you use my referral link below.
    www.binance.co...
    Outro Music:
    Wayr -- Between Our Universes • 【Chillstep】Wayr - Betw...

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

  • @rezazimohamedabdessamed5465
    @rezazimohamedabdessamed5465 3 года назад +1

    Man, you are special, especially your draws and final resume. Keep sharing Laravel videos!

    • @Acadeaio
      @Acadeaio  3 года назад +1

      There are a lot more to come, stay tuned!

  • @AbderrahmanFodili
    @AbderrahmanFodili Год назад +4

    this channel is a gold mine . thanks a billion my friend . I've been looking all over youtube for laravel related content that explains basic features in details for intermediate devs. I was tired of watching the same basics again and again but you always take things a step further and go deeper into the concepts of Laravel

  • @AbhimanyuNaikareWebDeveloper
    @AbhimanyuNaikareWebDeveloper 3 года назад +10

    I just wanna say, after years of doubts, u made the basics clear in programming :) Thanka

  • @leonvanrijswijk8409
    @leonvanrijswijk8409 3 года назад +6

    Thanks. I especially like the drawings for visual understanding

    • @Acadeaio
      @Acadeaio  3 года назад

      Glad you like them!

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

    This is the best explanation.

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

      Thanks a lot for the comment Harry! It really helps me to keep going

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

    thank you so much, very helpful

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

    good stuff

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

    thanks for the video

  • @jorgewandersantanaurena422
    @jorgewandersantanaurena422 7 месяцев назад

    Thanks for the video. I really enjoyed it.

  • @omaviva8657
    @omaviva8657 3 года назад

    OMG, you are the best thank you

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

    Thank you.

  • @technicalesson
    @technicalesson 3 года назад +1

    I like the way you have explained everything. Thanks

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

    Thanks a lot sir :)

  • @thinhbui9965
    @thinhbui9965 3 года назад +1

    I prefer the drawing than listen to coding. Hope you can explain in that way (drawing) more.

    • @Acadeaio
      @Acadeaio  3 года назад

      Thanks for the feedback, will do that whenever possible.

  • @yahiabouda
    @yahiabouda 19 дней назад

    Good vid

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

    You are gifted for sure. Can you explain the difference between Service Container and Single Action Class? Specifically, how are actions registered and implemented?

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

      To me actions are just PHP classes, used in some software pattern. It is not part of Laravel's architecture and you can simply bind them inside your service provider if you wish.

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

    Great !

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

    After injecting Map and Statallite class inside the GeoLocation class using the constructor and creating a search method, it is important to create a service provider to resolve both?

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

      up to you, you can totally rely on laravel's automatic resolution if you are not adding new features :)

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

      @@Acadeaio i didn't get how adding new features can be easier with service providers approach.. if anyone can explain to me

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

      i found that automatic resolution is often sufficient for many use cases but I need someone to enlighten me what are cases that it will not be sufficient, (regardless binding an interface)

  • @kywei7485
    @kywei7485 11 месяцев назад

    Very clear explanation, thank you very much!

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

    Mate you're an excellent teacher.

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

      Thanks mate, glad you enjoyed it!

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

    Just awesome....Beautifully explained

  • @idoschacham6276
    @idoschacham6276 9 месяцев назад

    Thanks for the clear and thorough explanations

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

    Excellent explanation of the core concept. Thanks a lot.

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

    Awesome , Thank you so much.

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

    thank you

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

    Thanks, bro. Большое спасибо!

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

    What does it mean by "resolving a service"? Can anyone enlighten me?

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

      it means getting an instance of a service from the container, in other words, instantiating a service (aka a class)

  • @technicalesson
    @technicalesson 3 года назад

    Please create more such type of videos of confusing tropics of Laravel.

    • @Acadeaio
      @Acadeaio  3 года назад

      More videos are coming, stay tuned!

  • @zcmdzpp127
    @zcmdzpp127 3 года назад

    Really good…

  • @hiajayy
    @hiajayy 3 года назад

  • @TheChyamp
    @TheChyamp 3 года назад

    Best vid I've seen so far

    • @Acadeaio
      @Acadeaio  3 года назад

      Thanks a lot for your comment! It means a lot to me.

  • @Muhammed-nani964
    @Muhammed-nani964 Год назад

    When I do app(\App\Service\Geolocation\Geolocstion::class); at first it says class not found then it says class name already in use and the error point to the name of geolocation class 😢 anyone can help ?
    Fuck I wasted so much time and I only forget to say

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

    when i add app(app(App\Providers\GeolocationServiceProvider::class)) on tinker i get that error message some help me i m using laravel 9 Unresolvable dependency resolving [Parameter #0 [ $app ]] in class Illuminate\Support\ServiceProvider.
    > app(App\Providers\GeolocationServiceProvider::class)

    • @Acadeaio
      @Acadeaio  Год назад +1

      perhaps try to run composer dump autoload