I have a problem with the code, everything is exactly as you have, but if currentUserId=1 everything is rendered correctly - once, but if currentUserId=25 it is rendered twice, the first time "you are not authorized to view this page" and immediately after here there is a note and there is a "delete" button. Also the menu is rendered twice.
hopeless programmer here, no joke, 15 years working in the industry (mostly web dev drupal crap, mediocre languages, never really did much OOP, I miraculously got a position as a backend engineer and I can see myself draining the life force of my team members) and my label is literally a help vampire, I learned that on stack overflow. I need to step up my game and stop being a weight or detriment to my team. I just heard recently laravel has called out laravel trainings suggesting they aren't up to par, what would be up to par? How would I find a location in the midwest (utah) to have someone qualified to train with? I'll watch the full series and keep working at it, but there's a disconnect, feels like I'm out of my league, and please no metaphors, I already know my confidence is low, and I'm working on it.
Can't you just keep learning? Try something hard. Try learning C, try learning those hard topics. This will have a great impact in the way you learn things. Easier things will start to be easier to learn. Don't be afraid to be stuck for weeks on a topic. Just don't stop learning. Every day, for 30min or so, learn something hard
Enjoying this series. Thank you. In the condition used to check the request is a POST request you used $_GET['id'] to get the submitted note id, so I want to know if it works that way and ask if it will not cause any problems later?
I found the answer ! According to the PHP documentation : " Note that the array ($_GET) is not only populated for GET requests, but rather for all requests with a query string."
You were sending a post request to delete a note with an id, but you were using $_GET['id'] for deleting it in the query... I think here should be $_POST['id'] instead.
@@roelofvanleeuwen Good question. Did anyone find an answer to this? Since this entered through a POST request, you would expect the GET global varaible to be empty and for some reason, it seems to work? Strange.
@@JohnnyBigodes I found the answer ! According to the PHP documentation : " Note that the array ($_GET) is not only populated for GET requests, but rather for all requests with a query string."
I am never getting tired of you. I can listen to this man whole day
exactly
One of the best dev in youtube.
Thank you.
Ty
I have a problem with the code, everything is exactly as you have, but if currentUserId=1 everything is rendered correctly - once, but if currentUserId=25 it is rendered twice, the first time "you are not authorized to view this page" and immediately after here there is a note and there is a "delete" button. Also the menu is rendered twice.
We want php oop and laravel 9 series pleaaase
hopeless programmer here, no joke, 15 years working in the industry (mostly web dev drupal crap, mediocre languages, never really did much OOP, I miraculously got a position as a backend engineer and I can see myself draining the life force of my team members) and my label is literally a help vampire, I learned that on stack overflow. I need to step up my game and stop being a weight or detriment to my team. I just heard recently laravel has called out laravel trainings suggesting they aren't up to par, what would be up to par? How would I find a location in the midwest (utah) to have someone qualified to train with? I'll watch the full series and keep working at it, but there's a disconnect, feels like I'm out of my league, and please no metaphors, I already know my confidence is low, and I'm working on it.
Can't you just keep learning? Try something hard. Try learning C, try learning those hard topics. This will have a great impact in the way you learn things. Easier things will start to be easier to learn. Don't be afraid to be stuck for weeks on a topic. Just don't stop learning. Every day, for 30min or so, learn something hard
where can i see source code?
Source code links on the phpforbeginners.com website, below each respective video.
Enjoying this series. Thank you.
In the condition used to check the request is a POST request you used $_GET['id'] to get the submitted note id, so I want to know if it works that way and ask if it will not cause any problems later?
This was just a mistake... It should instead be $_POST['id']
I found the answer ! According to the PHP documentation : " Note that the array ($_GET) is not only populated for GET requests, but rather for all requests with a query string."
You were sending a post request to delete a note with an id, but you were using $_GET['id'] for deleting it in the query... I think here should be $_POST['id'] instead.
Good catch! Will be fixed.
@@jeffreyway520 Now we just have to know how the hell that worked with a $_GET var? 😅
@@JohnnyBigodes I wonder the same thing :D
@@roelofvanleeuwen Good question. Did anyone find an answer to this? Since this entered through a POST request, you would expect the GET global varaible to be empty and for some reason, it seems to work? Strange.
@@JohnnyBigodes I found the answer ! According to the PHP documentation : " Note that the array ($_GET) is not only populated for GET requests, but rather for all requests with a query string."