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.
Oh dear Gio! This was jedi stuff The way you write code is trully beautiful and inspiring.
Thank you 🙏
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".
Thank you 🙏
I approve this comment 🎉
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
Thank you 🙌🙌
I haven't gotten here yet but I'm coming... Running
Have fun 🙌
Great video
Thank you
Класс 👍 спасибо братан!
You're welcome & thank you 🙌
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.
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.
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?
Hey. There are about 6-7 more videos left to finish the project & series
@@ProgramWithGio love u man keep it up awesome course
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.
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.
@@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,...));
@@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.
@@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.
@@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.
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.
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.
@@ProgramWithGio i do this when coding, but i am talking about previous sections.
@@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
@@ProgramWithGio i will start doing this. Thanks a lot.❤
@@hasanmostafa7746 no problem, good luck 🤞💙
Hello could you upload video about how to upgrade version. In php and laravel eg : upgrade laravel 8 to 9 .
Hello. Yes we'll upgrade PHP to 8.2 in this series from 8.1
Sir can you upload the video for this full course please? 🥹🙏 I’m from Cambodian I really appreciate your course 🥹
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.
@@ProgramWithGio I want you to upload more video until the end please sir 🥹🙏.
🙂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.
@@ProgramWithGio ahh okay thank you so much sir at least you upload the video 🥹🙏 for us. Respect 🥹🙏❤️