added folder resource

This commit is contained in:
Peter Papp
2021-08-26 15:06:39 +02:00
parent bee7352b28
commit f5f2179145
9 changed files with 157 additions and 19 deletions

View File

@@ -48,7 +48,6 @@ class Folder extends Model
protected $appends = [
'items',
'trashed_items',
'type',
];
protected $casts = [
@@ -74,11 +73,6 @@ class Folder extends Model
return FolderFactory::new();
}
public function getTypeAttribute(): string
{
return 'folder';
}
/**
* Index folder
*/
@@ -122,17 +116,6 @@ class Folder extends Model
return $folders + $files;
}
/**
* Format created at date reformat
*/
public function getCreatedAtAttribute(): string
{
return format_date(
set_time_by_user_timezone($this->attributes['created_at']),
__t('time')
);
}
/**
* Format deleted at date reformat
*/