mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-04 20:23:16 +00:00
20 lines
No EOL
434 B
PHP
20 lines
No EOL
434 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',
|
|
'id' => $like->actor->permalink('#likes/'.$like->id),
|
|
'type' => 'Like',
|
|
'actor' => $like->actor->permalink(),
|
|
'object' => $like->status->url()
|
|
];
|
|
}
|
|
} |