Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 8 |
SiteList | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 8 |
toArray | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 8 |
1 | <?php |
2 | |
3 | namespace Qmp\Laravel\SiteGeneratorDetail\Resources; |
4 | |
5 | use Illuminate\Http\Resources\Json\JsonResource; |
6 | |
7 | class SiteList extends JsonResource |
8 | { |
9 | /** |
10 | * Transform the resource collection into an array. |
11 | * |
12 | * @param \Illuminate\Http\Request $request |
13 | * @return array |
14 | */ |
15 | public function toArray($request) |
16 | { |
17 | return [ |
18 | 'text' => $this->dotGet('text'), |
19 | 'domain' => $this->dotGet('config.domain.text'), |
20 | 'url' => $this->dotGet('config.url'), |
21 | 'hash' => $this->dotGet('config.urlHash'), |
22 | 'date' => $this->dotGet('config.date'), |
23 | 'id' => $this->dotGet('id'), |
24 | 'state' => $this->dotGet('config.state'), |
25 | 'progress' => $this->progress |
26 | ]; |
27 | } |
28 | } |