1
0
Fork 0
pixelfed/app/Transformer/ActivityPub/Verb/Like.php

19 lines
376 B
PHP
Raw Normal View History

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