I rewrote the routes again and made a type and it seemed to fix it. I guess I had a space in ->middleware('can:edit, user'); which I thought was correct. However, it should've been ->middleware('can:edit,user'); I can't think of any other reason it wasn't working.
Getting 403 when editing profile in Laravel From Scratch
I don't understand what happened. My code was working perfectly, then I made some changes at the start of this video (https://laracasts.com/series/laravel-6-from-scratch/episodes/65?autoplay=true) and now whenever I submit a patch request for the profile I'm logged into I get a 403 error. I've tried rolling back and it doesn't seem to help. I'm not even sure what file I should show to receive help at this point because it seems like it could be a lot of things.
Edit: So I removed this middleware from the routing: ->middleware('can:edit, user'); and it lets me do it. For some reason, the logged-in user has lost authorization, but they pass the same authorization to view the edit form for the profile?
Please or to participate in this conversation.