Completed
Push — master ( bc69cb...e24ad8 )
by Ron
02:35
created

GalaxyCollection::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Http\Collections;
4
5
use Illuminate\Http\Resources\Json\ResourceCollection;
6
7
class GalaxyCollection extends ResourceCollection
8
{
9
    /**
10
     * Transform the galaxy collection into an array.
11
     *
12
     * @param  \Illuminate\Http\Request
13
     * @return array
14
     */
15
    public function toArray($request)
16
    {
17
        return [
18
            'data' => $this->collection,
19
        ];
20
    }
21
}