dev-master
9999999-devAdd functionality to like objects.
MIT
The Requires
behavior propel likes
Add functionality to like objects.
Download LikeableBehavior.php and put it somewhere., (*1)
``` ini propel.behavior.likeable.class = path.to.likeable.behavior, (*2)
If you are using composer then just add: ```js { "require": { "smirik/propel-likeable-behavior": "*" } }
Add to schema.xml:, (*3)
``` xml
Behavior will create table *likes* and add several methods to the Model: ``` php public function addLike($user_id, $mark = 1, PropelPDO $con = null); public function removeLike($user_id, PropelPDO $con = null) public function hasLike($user_id, PropelPDO $con = null) public function countLikes(PropelPDO $con = null)
user_id could be any integer., (*5)
Add functionality to like objects.
MIT
behavior propel likes