Laravel 7.x and 6.x user profile page example

February 11, 2019 | Category : Laravel 5.7 Laravel 5 Laravel PHP

In this tutorial, i will let you know how to create profile page with update validation in laravel 5.7. You can learn how to write validation for update profile page. You will understand of email, name, profile image upload or profile picture avatar etc in user profile page.

Just follow bellow example code and learn to add validation of user profile page in laravel 5.7.

Update Method:

public function update(Request $request)


$user = Auth::user();


'name' => 'required|max:255',

'email' => 'required|email|max:255|unique:users,id,'.$user->id,


$user->name = $request->name;

$user->email = $request->email;



'password' => 'min:6|confirmed',


$user->password = bcrypt($request->password);




'profileImg' => 'mimes:png',


$profileName = $user->id.'_avatar'.time().'.'.request()->profile->getClientOriginalExtension();


$user->profile = $profileName;



return view('home.profile', array('user' => Auth::user()));


Might be it can be help you...