예제 #1
0
 /**
  * Set a given attribute on the model.
  *
  * @param  string  $key
  * @param  mixed   $value
  * @return void
  */
 public function setAttribute($key, $value)
 {
     // Hash required fields when necessary
     if (in_array($key, $this->hashableAttributes) and !empty($value)) {
         $value = $this->hash($value);
     }
     return parent::setAttribute($key, $value);
 }