pixelfed/app/Transformer/ActivityPub/Verb/Follow.php
2018-12-31 23:26:42 -07:00

19 lines
406 B
PHP

<?php
namespace App\Transformer\ActivityPub\Verb;
use App\Follower;
use League\Fractal;
class Follow extends Fractal\TransformerAbstract
{
public function transform($follower)
{
return [
'@context' => 'https://www.w3.org/ns/activitystreams',
'type' => 'Follow',
'actor' => $follower->actor->permalink(),
'object' => $follower->target->permalink()
];
}
}