You're amazing. Your's are the best php tutorial I've been by far in youtube.
@ProgramWithGio2 жыл бұрын
Happy to hear that, thank you 💙
@omaryahia11 ай бұрын
you improve the code structure many times more effort from your side but very educational for us thank you 🌟
@ProgramWithGio10 ай бұрын
Glad you like it 💙
@Zubbee2 жыл бұрын
Shoot! KZbin notification was late! But I'm super glad. Lemme dig in. Thanks Gio
@ProgramWithGio2 жыл бұрын
Let's get coding 👨💻
@benderbg2 ай бұрын
17:42 I think this error happened because of the directory structure. You were in expennies/configs/container/container_bindigs.php path and from there you wanted to create UserProviderService in expennies/app/Services path so IDE thought you were using relative instead of absolute path.
@ProgramWithGio2 ай бұрын
Yea it created the class under different directory
@pulpsting2 жыл бұрын
You are making a whole framework lol.
@ProgramWithGio2 жыл бұрын
Nope, I'm not making a whole framework. In fact, we are using a Slim framework. I'm just implementing the session based authentication myself because there are not that many packages available that provide that.
@hansschuijff2 жыл бұрын
A lot of refactoring in this lesson and I had to go slow to understand it al. Not always sure of why, but that is perhaps the difference in experience. You seem very capable and experienced in this way of coding. And passing credentials when you only need email or password seems to obscure the purpose of some methods perhaps, but that is probably done this way since you know it is not an end-stage of it and will change to a DTO solution or will get more credentials than we use now. I am getting to understand middle ware a bit now, it seems something like a wrapper function that basically uses the call stack. It's a nice solution. But all in all a great inside in your way of looking at it and experiencing how you work. If this is the speed you can do it unprepared too, you're much faster in refactoring than I can see myself be. 🙂 Impressive. I do find in OOP that the more a project grows, the more difficult it seems to keep everything straight (what is where) and the need of a good IDE makes a difference. I have tried to understand and debug some WordPress plugins in OOP and when they were big, like The events calendar, it wasn't easy for me to get into the structure of it, so I would find where to go. I always felt in oop you need a roadmap to find out where to go. Perhaps now I have learned some design patterns in your course I would recognize more of it. I hope so. This is a nice project to work on. Thank you for the lessons.
@ProgramWithGio2 жыл бұрын
Happy to hear, thank you. Refactoring becomes easy with experience, after you've done it many times across multiple projects. As for the DTO part yes, I will try to convert things to DTOs as we go but I also want you the viewer to try things out your way.
@Armando-px8hi Жыл бұрын
Awesome work As Always.And of course can not stop apllauding you fo this job. Just one question Gio, do you know what can be the reason that every change I do in the twig templates it just do not work. For example the logout ui is not being displayed in my server. I tried it in my own code, then I tried to take it from your github but it was not helpful. Do you have any idea?
@ProgramWithGio Жыл бұрын
Thank you. Do you get any errors? It might also be cache, try deleting the twig templates cache directory and see if it works. Might want to disable caching for local dev
@Armando-px8hi Жыл бұрын
@@ProgramWithGio no, nothing about errors. I just keep getting the template that was in the first part.I also deleted the view directory and after putted it once again but still doesn’t help.
@ProgramWithGio Жыл бұрын
@@Armando-px8hi not the view directory, there is cache directory created under storage directory, delete that. It's most likely cache related
@Armando-px8hi Жыл бұрын
@@ProgramWithGio Just tried it , it was from ul, li…Thanks very much Gio👏👏👏
@jordanbicanic93439 ай бұрын
@@ProgramWithGio little late to discussion, but I had similar problem and it's not cache. It's npm run dev what I had to do. This is mentioned in lesson P.2 near beginning.
@bijayaprasadkuikel51622 жыл бұрын
It's sad that we need to wait 1 whole week to get new videos. Awesome job. 👍
@ProgramWithGio2 жыл бұрын
Next video is actually scheduled for Thursday. But yea unfortunately I don't have a lot of free time to make videos faster.
@kenjohnsiosan97072 жыл бұрын
as always your tutorial series is very helpful
@ProgramWithGio2 жыл бұрын
Happy to hear that, thank you 🙌
@AVa1lable12 жыл бұрын
Valuable. Nice job!
@ProgramWithGio2 жыл бұрын
Thank you
@MyMedo27 Жыл бұрын
Hello, First of all thanks for your great content which is so helpful small notice, I think this video is flipped with the next one cause at you say last we talked about session fixation and hijacking but these topics are in the next video
@ProgramWithGio Жыл бұрын
Thank you. Session fixation & hijacking were covered in previous video, you can see the outline here as well as full list of videos in order: github.com/ggelashvili/learnphptherightway-outline The next video is P.7 and covers session refactoring
@sam_sheridan2 жыл бұрын
Amazing job
@ProgramWithGio2 жыл бұрын
Thank you
@davidfeldt13628 ай бұрын
Gio, what is your perspective on using JWT tokens for authentication instead of the session cookie approach that you have in these videos? We have a mobile application that will require authentication and we want to use JWT for the mobile app. There is also a web app and we don't want to have two different approaches within the same codebase.
@ProgramWithGio7 ай бұрын
JWT is fine for the most part for cases where session based approach is not possible like mobile apps. Laravel has first party support for authenticating mobile apps using tokens via sanctum
@morteza55510 Жыл бұрын
Why we didn't use Repository design pattern instead of UserServiceProvider? BTW when we should use interfaces and when we shouldn't, what's about abstract classes?
@ProgramWithGio Жыл бұрын
You are free to use any design pattern that you like. Repository pattern could work too but it may complicate things depending on how you implement the repository pattern. There are lessons about interfaces & abstract classes in this course, check the link to the outline repo or the playlist that lists all the videos and you will find ones about interface & abstract classes. Do you have any specific question about abstract classes?
@morteza55510 Жыл бұрын
@@ProgramWithGioNah Thanks for the quick response
@mwaas Жыл бұрын
Another video another greatness. I have a question about login tocken. We use cookies to add a remember me feature that keeps the user logged in after the browser is closed. we store user id or token reference to user in cookies. but I can copy cookies form user's browser and paste it in my browser so I have access to user's acount . what is the method to preventing login by copy login coockies? I just need refrence or any artical about this topic sorry for the poor english
@ProgramWithGio Жыл бұрын
If someone has access to your computer who can steal your cookie then yea but they could also steal a lot of things while having access to your computer. There are other ways to steal cookies as well via XSS which we cover in few lessons & how to add proper protection.
@mwaas Жыл бұрын
@@ProgramWithGio Yes, that's what I mean in case someone accesses the user's browser and steals the cookie file. They can then paste this value into their device and log in. However, when I try to do this on all websites, it doesn't work, even on Breez in Laravel it doesn't work, and therefore there is a way to prevent this. I'm still delving into this topic and I think I'll find an answer. Thank you, Professor Geo, for everything you provide us. I am very grateful to you.☺
@ProgramWithGio Жыл бұрын
@@mwaas Yea, we cover that in here. You'll get to Session hijacking/fixation, CSRF & XSS videos soon.
@dev_troy89039 ай бұрын
surprisingly the order of middleware registration matters. I spent 20 minutes trying to figure out why AuthenticationMiddleware is not working. It was the order of registration of middlewares. how does that affect the program ??
@ProgramWithGio9 ай бұрын
Yes we covered that in section 3 lesson 28 - kzbin.info/www/bejne/rXS9hndsgaeXiMk at around minute 3
@bakosyy Жыл бұрын
Is there anything wrong if we start the sessions and save them immediately before creating a response like this? $this->session->start(); $this->session->save(); $response = $handler->handle($request); return $response; What is the difference if we start the session, then create a response and only then save the sessions and return response?
@ProgramWithGio Жыл бұрын
Yes the session won't be available anymore on the way out for middlewares so some things may not work as expected
@chan270 Жыл бұрын
How can we restrict a user to only be logged in on one device and logged out from all other devices. Good for financial apps.
@ProgramWithGio Жыл бұрын
You could do it with a bit of session management, on log in check if user already has an active session, destroy active sessions & log the user in from current device. There are multiple ways this can be implemented.
@chan270 Жыл бұрын
@@ProgramWithGio Thanks, i appreciate your response.
@Damisicotvshows2 жыл бұрын
Pls how can I get all this lecture source code, I try to click the link in description am unable to download it
@ProgramWithGio2 жыл бұрын
Link to github repo is in the description, so click on it & you should be able to download it from there
@mwaas Жыл бұрын
I think there is mistake in order videos because "Session Based Authentication" is the lesson 107 and this lesson is 106
@ProgramWithGio Жыл бұрын
This is the correct order, we add session interface in the next lesson. We basically slowly build up to it.
@mwaas Жыл бұрын
@@ProgramWithGio Yes, that's true. I'm sorry, things got mixed up for me because of fasting during Ramadan.