Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| PlanResource | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| toArray | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Resources\v2; |
| 4 | |
| 5 | use Illuminate\Http\Request; |
| 6 | use Illuminate\Http\Resources\Json\JsonResource; |
| 7 | |
| 8 | class PlanResource extends JsonResource |
| 9 | { |
| 10 | /** |
| 11 | * Transform the resource into an array. |
| 12 | * |
| 13 | * @return array<string, mixed> |
| 14 | */ |
| 15 | public function toArray($request) |
| 16 | { |
| 17 | return array_merge(parent::toArray($request), [ |
| 18 | 'flycuts_features' => $this->flycuts_features ?? [], |
| 19 | ]); |
| 20 | } |
| 21 | } |