pixelfed/app/Transformer/Api/MentionTransformer.php
2018-08-28 03:07:36 +00:00

19 lines
405 B
PHP

<?php
namespace App\Transformer\Api;
use App\Profile;
use League\Fractal;
class MentionTransformer extends Fractal\TransformerAbstract
{
public function transform(Profile $profile)
{
return [
'id' => $profile->id,
'url' => $profile->url(),
'username' => $profile->username,
'acct' => $profile->username,
];
}
}