mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 02:24:31 +00:00
19 lines
390 B
PHP
19 lines
390 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,
|
||
|
];
|
||
|
}
|
||
|
}
|