Skip to content

Commit

Permalink
Merge pull request #63 from Flynsarmy/dev
Browse files Browse the repository at this point in the history
Let plugins add hashable fields
  • Loading branch information
daftspunk committed Jan 25, 2015
2 parents 729874b + 847c791 commit 1e7e953
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Database/Traits/Hashable.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ public static function bootHashable()
});
}

/**
* Adds an attribute to the hashable attributes list
* @param string $attribute Attribute
* @return this
*/
public function addHashableAttribute($attribute)
{
$this->hashable[] = $attribute;
return $this;
}

/**
* Hashes an attribute value and saves it in the original locker.
* @param string $key Attribute
Expand Down Expand Up @@ -77,4 +88,4 @@ public function getOriginalHashValue($attribute)
? $this->originalHashableValues[$attribute]
: null;
}
}
}

0 comments on commit 1e7e953

Please sign in to comment.