By default Laravel already comes with a pre-ready authentication system, however, someone would know to tell me what the default algorithm this framework uses for hash and what version thereof?
By default Laravel already comes with a pre-ready authentication system, however, someone would know to tell me what the default algorithm this framework uses for hash and what version thereof?
According to documentation , for this type of task, BCrypt , which matches a ask about secure passwords here . Example:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use App\Http\Controllers\Controller;
class UpdatePasswordController extends Controller {
/**
* Update the password for the user.
*
* @param Request $request
* @return Response
*/
public function update(Request $request) {
// Validate the new password length...
$request->user()->fill([
'password' => Hash::make($request->newPassword)
])->save();
}
}