Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ProductAdapter extends BaseAdapter |
||
9 | { |
||
10 | /** |
||
11 | * Single resource transformer |
||
12 | * |
||
13 | * @param mixed $model |
||
14 | */ |
||
15 | public function __construct($model) |
||
16 | { |
||
17 | parent::__construct(new ProductResource($model)); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Static function for the collection |
||
22 | * |
||
23 | * @param \Illuminate\Database\Eloquent\Model $model |
||
24 | * @return array |
||
25 | */ |
||
26 | public static function collection($collection): array |
||
32 | } |
||
33 | } |