Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

hash password laravel

<?php
 
namespace AppHttpControllers;
 
use AppHttpControllersController;
use IlluminateHttpRequest;
use IlluminateSupportFacadesHash;
 
class PasswordController extends Controller
{
    /**
     * Update the password for the user.
     *
     * @param  IlluminateHttpRequest  $request
     * @return IlluminateHttpResponse
     */
    public function update(Request $request)
    {
        // Validate the new password length...
 
        $request->user()->fill([
            'password' => Hash::make($request->newPassword)
        ])->save();
    }
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #hash #password #laravel
ADD COMMENT
Topic
Name
2+1 =