Completed
Push — master ( ce343e...8c2661 )
by Sam
12:36
created

AssociationCollection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 6 1
1
<?php
2
3
namespace App\Http\Resources;
4
5
use App\Http\Resources\Association as AssociationResource;
6
use App\Http\Resources\AssociationCollection as AssociationCollectionResource;
7
8
use Illuminate\Http\Resources\Json\ResourceCollection;
9
10
class AssociationCollection extends ResourceCollection
11
{
12
    /**
13
     * Transform the resource collection into an array.
14
     *
15
     * @param  \Illuminate\Http\Request  $request
16
     * @return array
17
     */
18
    public function toArray($request)
19
    {
20
        return [
21
            'data' => $this->collection,
22
            'links' => [
23
                'self' => 'link-value',
24
            ],
25
        ];
26
    }
27
}
28