Reacter
Prefer to use Reacter Facade instead of Reacter model for the API simplicity and easier future migration process.
Get Reacterable
$reacterable = $reacter->getReacterable();
Returns User, Person, Organization or any other model which acting as this Reacter.
React to Reactant
$reacter->reactTo($reactant, $reactionType);
Remove Reaction from Reactant
$reacter->unreactTo($reactant, $reactionType);
Check if Reacter Reacted to Reactant
Determine if Reacter reacted to Reactant with any type of reaction.
$isReacted = $reacter->isReactedTo($reactant);
$isNotReacted = $reacter->isNotReactedTo($reactant);
Determine if Reacter reacted to Reactant with exact type of reaction.
$reactionType = ReactionType::fromName('Like');
$isReacted = $reacter
->isReactedToWithType($reactant, $reactionType);
$isNotReacted = $reacter
->isNotReactedToWithType($reactant, $reactionType);
Get Reactions Which Reacter Has Made
$reactions = $reacter->getReactions();
Updated over 6 years ago
