mirror of https://github.com/pixelfed/pixelfed.git
19 lines
376 B
PHP
19 lines
376 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()
|
|
];
|
|
}
|
|
} |