import hash laravel

Solutions on MaxInterview for import hash laravel by the best coders in the world

showing results for - "import hash laravel"
Alexander
19 Jan 2018
1<?php
2
3namespace App\Http\Controllers;
4
5use App\Http\Controllers\Controller;
6use Illuminate\Http\Request;
7use Illuminate\Support\Facades\Hash;
8
9class PasswordController extends Controller
10{
11    /**
12     * Update the password for the user.
13     *
14     * @param  \Illuminate\Http\Request  $request
15     * @return \Illuminate\Http\Response
16     */
17    public function update(Request $request)
18    {
19        // Validate the new password length...
20
21        $request->user()->fill([
22            'password' => Hash::make($request->newPassword)
23        ])->save();
24    }
25}