pixelfed/app/Transformer/Api/MentionTransformer.php

20 lines
414 B
PHP
Raw Permalink 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 [
'id' => (string) $profile->id,
2018-08-28 03:07:36 +00:00
'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
}