---
agentTools:
  projectIndex: https://laravel-love.readme.io/llms.txt
---

# Reactable

## Reactable Registration

`Reactable` registers as `Reactant` only once. It will be done automatically on each successful create of the`Reactable`.

Register `Reacterable` manually:

```php
$user->registerAsLoveReactant();
```

> 🚧
>
> If model already registered as `Reactant` then `Cog\Contracts\Love\Reactable\Exceptions\AlreadyRegisteredAsLoveReactant` exception will be thrown.

## Get Reactant Facade

Get `Reactant` facade from `Reactable` model. Read about [Reactant Facade API](reactant-facade).

```php
$reactantFacade = $user->viaLoveReactant();
```

## Get Reactant Model

Get `Reactant` model from `Reactable` model. Read about [Reactant Model API](reactant).

```php
$reactant = $user->getLoveReactant();
```

> 📘 Reactant Null Object
>
> Method `getLoveReactant` returns `NullReactant` if `Reactable` model is not registered as `Reactant`.

## Verify Reacterable Registration

Use boolean methods to verify if `Reactable` is registered as `Reactant` or not.

```php
$isRegistered = $comment->isRegisteredAsLoveReactant(); // true

$isNotRegistered = $comment->isNotRegisteredAsLoveReactant(); // false
```