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 [
|
2019-01-28 02:40:36 +00:00
|
|
|
'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
|
|
|
}
|