Hash::needsRehash PHP Method

needsRehash() public static method

Check if the given hash has been hashed using the given options.
public static needsRehash ( string $hashedValue, array $options = [] ) : boolean
$hashedValue string
$options array
return boolean
        public static function needsRehash($hashedValue, $options = array())
        {
            return \Illuminate\Hashing\BcryptHasher::needsRehash($hashedValue, $options);
        }

Usage Example

示例#1
0
 /**
  * Set the user's password.
  *
  * @param  string  $value
  *
  * @return string
  */
 public function setPasswordAttribute($value)
 {
     if (\Hash::needsRehash($value)) {
         $value = bcrypt($value);
     }
     $this->attributes['password'] = $value;
 }
All Usage Examples Of Hash::needsRehash