Refactor to use Eloquent instead of Doctrine DBAL - Full PHP 8 Tutorial

Поделиться
HTML-код
  • Опубликовано: 2 май 2022
  • In this lesson, we refactor the code to use Laravel Eloquent instead of Doctrine DBAL & we learn about model events.
    SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
    👍 Smash the like button
    🤝 Subscribe to the channel & turn the notifications on
    💬 Post comments, any feedback is greatly appreciated
    ⭐ Become a Patreon: / programwithgio
    THANK YOU!
    🛠️ TOOLS & SERVICES I USE
    Digital Ocean Hosting - Get 100$ credit - m.do.co/c/38b935ad74e5
    Domains on Namecheap - namecheap.pxf.io/rnRjdQ
    Envato Elements - 1.envato.market/c/2937311/298...
    LESSON 3.20
    Course Outline - github.com/ggelashvili/learnp...
    Course Playlist - • Learn PHP The Right Wa...
    RESOURCES
    Source Repo - github.com/ggelashvili/learnp...
    Laravel Eloquent - laravel.com/docs/9.x/eloquent
    Previous Lesson (3.19) - • What is active record ...
    ** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

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

  • @jackrourke9237
    @jackrourke9237 2 года назад +2

    You're a gem 💎 you clarify the complications so much easily ♥ ♥ ♥ ♥ Keep Going

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

    You're the best source to master php for me, thanks bro

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

    Thank you sir, about watching your videos.

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

    Wow I like refactorings though it can be tricky. Now I think I have to go back to the PDO lessons so I can really remember how we build that up and see the differences with eloquent better. but first, I'll move on. Getting close to the current finish line. Thanks again and again Gio.

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

      Yeah, it can certainly be tricky sometimes, but refactoring is one of the best ways to improve & practice.

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

    In the end it was easy to change to Laravel from what was already there. The entities have become obsolete too, so they could have been removed.
    Now we are left with the question what framework is better to use. I liked the migration functionality of Doctrine, but perhaps Laravel had something like that too?
    Both seem to add functionality, ease of use and flexibility. Perhaps is just a question of preference, or earlier choices by existing projects.
    What worries me sometimes is how much code we add to use packages and if that makes projects unnecessarily heavy.
    I see in the WordPress space that each (premium) plugin tends to solve overlapping problems with all kind of packages and in total that adds up. A lot of code to load and manage for php and it copes, but when I run the same code on my local machine (laptop) the response time may be so dramatic that i wonder how servers even cope with it.
    Well, thanks again for demonstrating the basics of them and getting us started. Again a great lesson and nice to see how it all comes together.

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

      Yup if you use Laravel entities are not needed. I left it there for comparison. As far as which to choose is down to preference mostly, you like Data Mapper pattern and less magic? Go for doctrine. Do you like active record with flexibility, less boilerplate but more magic? Go for eloquent.
      Laravel has its own migrations yes, but is pretty much the same. I personally use Laravel for most of my projects, but I started using Symfony with Doctrine & Slim recently as well. I like to switch between them.

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

    Thank you.

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

    Thanks it is a very powerful

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

    master great gio ❤ patreon link not open ?

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

      Hey, it should be open & working. It's in the description

    • @abdallakaram5376
      @abdallakaram5376 2 года назад +2

      ​@@ProgramWithGio Thank you, great teacher, for all you do for us
      my ugly isp blocked it i use vpn now its opend

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

    Please when are we going to see a Laravel tutorial full course

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

      Can't give you an accurate date because I have many planned videos before that. I'll make sure to announce it when/if I start working on it

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

      @@ProgramWithGio ok thanks I'll be waiting. Your pho course videos are amazing and self explanatory by the way ❤️❤️❤️

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

      @@yongdev thank you, glad to hear that 💙

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

    First! ❤️❤️❤️