mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-27 08:43:17 +00:00
19 lines
426 B
PHP
19 lines
426 B
PHP
<?php
|
|
|
|
namespace App\Transformer\Api\Mastodon\v1;
|
|
|
|
use App\Profile;
|
|
use League\Fractal;
|
|
|
|
class MentionTransformer extends Fractal\TransformerAbstract
|
|
{
|
|
public function transform(Profile $profile)
|
|
{
|
|
return [
|
|
'id' => (string) $profile->id,
|
|
'url' => $profile->url(),
|
|
'username' => $profile->username,
|
|
'acct' => $profile->username,
|
|
];
|
|
}
|
|
}
|