pixelfed/app/Transformer/Api/MentionTransformer.php

20 lines
405 B
PHP
Raw Normal View History

2018-07-12 16:42:17 +00:00
<?php
namespace App\Transformer\Api;
use App\Profile;
use League\Fractal;
class MentionTransformer extends Fractal\TransformerAbstract
{
public function transform(Profile $profile)
{
return [
2018-08-28 03:07:36 +00:00
'id' => $profile->id,
'url' => $profile->url(),
2018-07-12 16:42:17 +00:00
'username' => $profile->username,
2018-08-28 03:07:36 +00:00
'acct' => $profile->username,
2018-07-12 16:42:17 +00:00
];
}
2018-08-28 03:07:36 +00:00
}