use IlluminateSupportFacadesHash;
$password=Hash::make('password');
use IlluminateSupportFacadesHash;
Hash::make($newPassword);
if (Hash::check('plain-text', $hashedPassword)) {
// The passwords match...
}
//pass your password to following function
bcrypt('12343');
//or use following method
use IlluminateSupportFacadesHash;
Hash::make('password');
$password = Hash::make('yourPa$$w0rd');
<?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();
}
}
$data = User::find($id);
if( ! Hash::check( $data->password , Input::get('currPassword') ) )
{
return Redirect::to('/admin/profile')
->with('message', 'Current Password Error !')
->withInput();
}
$password = Input::get('passwordformfield'); // password is form field
$hashed = Hash::make($password);
use IlluminateSupportFacadesHash;
$hashed = Hash::make('password', [
'memory' => 1024,
'time' => 2,
'threads' => 2,
]);
$data = User::find($id);
if( ! Hash::check( Input::get('currPassword') , $data->password ) )
{
return Redirect::to('/admin/profile')
->with('message', 'Current Password Error !')
->withInput();
}