team folder browsing with static team folder details

This commit is contained in:
Peter Papp
2021-08-31 14:08:47 +02:00
parent f44e262d6e
commit a3516769de
46 changed files with 317 additions and 225 deletions
+3 -4
View File
@@ -1,5 +1,4 @@
<?php
namespace Domain\Files\Resources;
use Domain\Sharing\Resources\ShareResource;
@@ -40,10 +39,10 @@ class FileResource extends JsonResource
),*/
],
'relationships' => [
$this->mergeWhen($this->shared, fn() => [
$this->mergeWhen($this->shared, fn () => [
'shared' => new ShareResource($this->shared),
]),
$this->mergeWhen($this->parent, fn() => [
$this->mergeWhen($this->parent, fn () => [
'parent' => [
'data' => [
'type' => 'folder',
@@ -54,7 +53,7 @@ class FileResource extends JsonResource
],
],
]),
]
],
],
];
}