1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 14:42:42 +01:00
invoiceninja/app/Ninja/Transformers/ProductTransformer.php
2015-11-19 13:50:35 +02:00

18 lines
441 B
PHP

<?php namespace App\Ninja\Transformers;
use App\Models\Product;
use League\Fractal;
class ProductTransformer extends EntityTransformer
{
public function transform(Product $product)
{
return [
'id' => (int) $product->public_id,
'product_key' => $product->product_key,
'notes' => $product->notes,
'cost' => $product->cost,
'qty' => $product->qty,
];
}
}