mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 08:14:10 +00:00
Add InstanceTransformer
This commit is contained in:
parent
5b4d76a32e
commit
a6a37cdd50
1 changed files with 25 additions and 0 deletions
25
app/Transformer/Api/InstanceTransformer.php
Normal file
25
app/Transformer/Api/InstanceTransformer.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Transformer\Api;
|
||||
|
||||
use App\Instance;
|
||||
use League\Fractal;
|
||||
|
||||
class InstanceTransformer extends Fractal\TransformerAbstract
|
||||
{
|
||||
public function transform(Instance $instance)
|
||||
{
|
||||
return [
|
||||
'uri' => $instance->url,
|
||||
'title' => null,
|
||||
'description' => null,
|
||||
'email' => null,
|
||||
'version' => null,
|
||||
'thumbnail' => null,
|
||||
'urls' => [],
|
||||
'stats' => [],
|
||||
'languages' => null,
|
||||
'contact_account' => null
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue