mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-03-14 12:29:44 +01:00
Fix transformer
This commit is contained in:
parent
7d8f3cd5b1
commit
a819b5f1cc
@ -3,13 +3,13 @@
|
||||
class MetricTransformer extends \League\Fractal\TransformerAbstract {
|
||||
public function transform(Metric $metric) {
|
||||
return [
|
||||
'id' => (int) $component->id,
|
||||
'name' => $component->name,
|
||||
'description' => $component->description,
|
||||
'suffix' => $component->suffix,
|
||||
'display' => $component->shouldDisplay,
|
||||
'created_at' => $component->created_at->timestamp,
|
||||
'updated_at' => $component->updated_at->timestamp,
|
||||
'id' => (int) $metric->id,
|
||||
'name' => $metric->name,
|
||||
'description' => $metric->description,
|
||||
'suffix' => $metric->suffix,
|
||||
'display' => $metric->shouldDisplay,
|
||||
'created_at' => $metric->created_at->timestamp,
|
||||
'updated_at' => $metric->updated_at->timestamp,
|
||||
];
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user