public function setPasswordAttribute($password)
 {
     $this->attributes['password'] = mcrypt($password);
     // When the following happens:
     //      $user->password = '******';
     // The user password will be a hashed version of that
 }
示例#2
0
 /**
  * Scope Mutator
  */
 public function setPasswordAttribute($password)
 {
     $this->attributes['password'] = mcrypt($password);
 }