- added file resource

- frontend refactoring
This commit is contained in:
Peter Papp
2021-08-26 18:01:57 +02:00
parent f5f2179145
commit 5c6a873b02
37 changed files with 339 additions and 773 deletions

View File

@@ -1,4 +1,5 @@
<?php
namespace Domain\Sharing\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
@@ -15,18 +16,16 @@ class ShareResource extends JsonResource
{
return [
'data' => [
'id' => (string) $this->id,
'type' => 'shares',
'id' => $this->id,
'type' => 'shared',
'attributes' => [
'permission' => $this->permission,
'is_protected' => $this->is_protected,
'item_id' => $this->item_id,
'expire_in' => (int) $this->expire_in,
'token' => $this->token,
'link' => $this->link,
'type' => $this->type,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'permission' => $this->permission,
'protected' => $this->is_protected,
'item_id' => $this->item_id,
'expire_in' => (int)$this->expire_in,
'token' => $this->token,
'link' => $this->link,
'type' => $this->type,
],
],
];