first commit
This commit is contained in:
24
app/Http/Transformers/Company/Company.php
Normal file
24
app/Http/Transformers/Company/Company.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Transformers\Company;
|
||||
|
||||
use App\Models\Company\Company as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class Company extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'domain' => $model->domain,
|
||||
'enabled' => $model->enabled,
|
||||
'created_at' => $model->created_at->toIso8601String(),
|
||||
'updated_at' => $model->updated_at->toIso8601String(),
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user