atanasg liked a comment+100 XP
3mos ago
It seems you accidentally left $_GET['id'] in there (both for lookup query for auth, as well as the actual delete query). [It still worked because you're using the same endpoint so _GET existed]
Thanks for the great series!
atanasg liked a comment+100 XP
3mos ago
@DanielH @JeffreyWay Had the same doubt, why use an input for the id if it's not being used.
If I'm not mistaken in Laravel you don't need the id hidden field, the id is included in the route so the form would go to /note/id. That means that even if your are making a POST request, the id travels in the URL.
atanasg liked a comment+100 XP
3mos ago
@DanielH Yes, the first thing I noticed is that he left $_GET by mistake but yes you are right, same id is also available in the URL query.
atanasg liked a comment+100 XP
3mos ago
@_me I completely disagree with this recommendation in the context of a beginner tutorial. While some people like Vim, and that's great, the vast majority of developers prefer working in an IDE. Try Vim if you want, but get ready for a steep learning curve.