Implement Route Model Binding With Slim - Build Expense Tracker App With PHP 8

Поделиться
HTML-код
  • Опубликовано: 17 апр 2023
  • In this video we implement Laravel's Route Model Binding in our SlimPHP app.
    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 P.27
    Starting Source Code - github.com/ggelashvili/expenn...
    Ending Source Code - github.com/ggelashvili/expenn...
    Course Outline - github.com/ggelashvili/learnp...
    Course Playlist - • Learn PHP The Right Wa...
    ** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

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

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

    Oh dear Gio! This was jedi stuff The way you write code is trully beautiful and inspiring.

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

    Indeed you are the best php tutor I've ever came across. Can't wait for the "Learn laravel the right way series from you".

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

    Hi Gio. This lesson is sublime. That you took us from route attributes using enums to slims request response implementations and now to adding route entity bindings I believe is given us a good foundation in understanding more abstracted routing implementations in Frameworks. Looks like you are truly preparing us to enjoy laravel the right way. Moving on Gio... Thank you so much

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

    I haven't gotten here yet but I'm coming... Running

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

    Great video

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

    Класс 👍 спасибо братан!

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

    Can you please explain when we have used a programming pattern while using the laravel framework.
    When we are developing a big feature we should write our code using any specific pattern. I normally use a repository pattern or business service layer for any application.

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

      The use of programming patterns is not a strict requirement and should be determined on a case-by-case basis depending on the project's goals, overall architecture, and specific needs. Patterns can be & a lot of times are misused or overused, leading to unnecessary complexity. It's important to carefully evaluate whether introducing a pattern such as the Repository pattern for a specific feature is beneficial and aligns with the overall design of the application.

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

    hi
    i really enjoyed ur first video im gonna start learning php asap with u but one more question is this course finished or will be updated?

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

      Hey. There are about 6-7 more videos left to finish the project & series

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

      @@ProgramWithGio love u man keep it up awesome course

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

    Hi, Gio. Helpful work. Thanks.
    May I please crave more of your indulgence to ask for clarification?
    See, very often, I see you pass Objects as Arguments to a method or Constructor in a different Class. You also often use the object name of one class to typecast a Parameter in another Class.
    It has become a Blackbox for me. And who knows how many more of your students who are facing same quandary?
    Could you just take a moment of digression to make a video dealing with how and when these are done? Please.

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

      Hey, I'm not sure I understand the question. Can you provide me a specific example of what you mean? Passing objects as arguments is common, it depends on what the method definition looks like. We covered method arguments and objects in second section of the course.

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

      @@ProgramWithGio
      Yes Gio, you did. But there, you did demonstrate when and how to use an Object as an argument in another method of a different Class.
      Am sorry, I am not able to make myself Clearer.
      I mean something like this:
      $obj2 = new ClassName2(new ClassName1($arg1, $arg2,...));

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

      @@NedumEze But that's nothing special though, I just sometimes do that to save a line if it makes sense and does not make it hard to read. You could do it in two lines like this:
      $obj1 = new ClassName1($arg1, $arg2);
      $obj2 = new ClassName2($obj1);
      its the matter of preference, nothing special. Either way is fine and sometimes having an extra variable is more readable.

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

      @@ProgramWithGio
      Thank you very much Gio.
      The other half of my question was:
      When you're defining a new Class, you occasionally did use the object name or Class name of another Class as the type for the Param.
      Like this:
      class Bike{}
      class Trike
      {
      Public function ( Bike $bike)
      {}
      }
      How does the Trike Class recognize "Bike" as a valid 'type' like string, int, etc.

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

      @@NedumEze classes are valid types, and it works just as it does in many other languages. If my function expects an object of Bike class then I can define the type of that argument as such. PHP is able to do the proper type checking behind the scenes and throw a type error if you provide an object of different class.

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

    Hi gio, I tried to take notes when watching your videos, but it takes a lot of time since your videos are full of information. can you suggest a better way of learning from your videos.

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

      Hello. This is a project section so instead of notes you should write the code to practice. So as you are following the video try writing the same code and add your own changes as needed.

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

      @@ProgramWithGio i do this when coding, but i am talking about previous sections.

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

      @@hasanmostafa7746 best thing to do for previous sections is to test things out as you learn. So if you watched a video about DI container, try it out, play with it, try to break it, etc. That's the best way to learn. For theory based videos, notes is a good way

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

      @@ProgramWithGio i will start doing this. Thanks a lot.❤

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

      @@hasanmostafa7746 no problem, good luck 🤞💙

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

    Hello could you upload video about how to upgrade version. In php and laravel eg : upgrade laravel 8 to 9 .

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

      Hello. Yes we'll upgrade PHP to 8.2 in this series from 8.1

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

    Sir can you upload the video for this full course please? 🥹🙏 I’m from Cambodian I really appreciate your course 🥹

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

      Not sure what you mean, all videos are here on my channel part of the "Learn PHP The Right Way" series. There is also a link in the description to the outline that lists all videos.

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

      @@ProgramWithGio I want you to upload more video until the end please sir 🥹🙏.

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

      🙂I do the best I can, I do this as a hobby on my free time so I record & upload when I have free time. Unfortunately I was not able to upload this week because of that, will try to upload next week.

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

      @@ProgramWithGio ahh okay thank you so much sir at least you upload the video 🥹🙏 for us. Respect 🥹🙏❤️