Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getProfilePassword() {
- return view('profile/password', ['user' => Auth::user()]);
- }
- public function postProfilePassword() {
- $user = Auth::user();
- $user->password = Hash::make(Input::get('new_password'));
- $user->save();
- }
- <form action="{{ route('profile/updatepassword') }}" method="post" enctype="multipart/form-data">
- <div class="form-group">
- <label for="name">Current Password</label>
- <input type="password" name="old_password" class="form-control" id="old_password">
- </div>
- <div class="form-group">
- <label for="name">Password</label>
- <input type="password" name="new_password" class="form-control" id="new_password">
- </div>
- <div class="form-group">
- <label for="name">New Password</label>
- <input type="password" name="new_password_confirm" class="form-control" id="new_password_confirm">
- </div>
- <button type="submit" class="btn btn-primary">Change Password</button>
- <input type="hidden" value="{{ Session::token() }}" name="_token">
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement