it_get_all_team_folders

This commit is contained in:
Peter Papp
2021-08-24 16:54:05 +02:00
parent e0ecfce382
commit 0c6621494e
5 changed files with 48 additions and 17 deletions

View File

@@ -1,4 +1,5 @@
<?php
namespace Domain\Folders\Models;
use Illuminate\Support\Str;
@@ -49,7 +50,8 @@ class Folder extends Model
];
protected $casts = [
'emoji' => 'array',
'emoji' => 'array',
'team_folder' => 'boolean',
];
protected $hidden = [
@@ -132,9 +134,9 @@ class Folder extends Model
/**
* Format deleted at date reformat
*/
public function getDeletedAtAttribute(): string | null
public function getDeletedAtAttribute(): string|null
{
if (! $this->attributes['deleted_at']) {
if (!$this->attributes['deleted_at']) {
return null;
}
@@ -226,7 +228,7 @@ class Folder extends Model
parent::boot();
static::creating(function ($model) {
$model->id = (string) Str::uuid();
$model->id = (string)Str::uuid();
});
static::deleting(function ($item) {