Skip to content
Advertisement

Tag: laravel-6

How to restrict a user to only see their own profile

I have a view (resources/view/front/auth/profile.blade.php) and my route in file web.php is: My problem is that when a user logs in and gets redirected to their own profile page (http://exmaple.com/profile/2), he/she can change the URL to http://exmaple.com/profile/3 and see other users’ profile. I want to use a middleware to check authenticated users id with URL parameter {user}. The $user->id will

Why is my validator is not validating in Laravel?

Why is my validator is not validating the input-email field, it accepts anything! This is my controller to update the database. The name in form is correct Edit: This is my entire code, I post here my code with just email but one guy said that is working, so why this is not working with my entire code of update

Advertisement