1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00
pixelfed/app/Transformer/ActivityPub/Verb/Like.php
2018-11-12 22:26:19 -07:00

19 lines
No EOL
403 B
PHP

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