Skip to content

Commit

Permalink
Add stock transformer
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Feb 8, 2022
1 parent e012cdb commit 261403b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apiresources/transformers/StockTransformer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Igniter\Api\ApiResources\Transformers;

use Admin\Models\Stocks_model;
use League\Fractal\TransformerAbstract;

class StockTransformer extends TransformerAbstract
{
public function transform(Stocks_model $stock)
{
return array_merge($stock->toArray(), []);
}
}

0 comments on commit 261403b

Please sign in to comment.