|
@@ -18,6 +18,13 @@ class ProjectSimpleResource extends JsonResource
|
|
|
'id' => $this->id,
|
|
|
'name' => $this->name,
|
|
|
'display_id'=>$this->display_id,
|
|
|
+ 'begin' => $this->begin,
|
|
|
+ 'end' => $this->end,
|
|
|
+ 'asset'=> $this->when($this->assets->isNotEmpty(),function (){
|
|
|
+ return $this->assets->map(function ($asset){
|
|
|
+ return new SimpleAssetResource($asset);
|
|
|
+ })->all();
|
|
|
+ }),
|
|
|
];
|
|
|
}
|
|
|
}
|