Skip to content

Commit

Permalink
upgrade L11
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahiAbdulkabir committed Aug 7, 2024
1 parent 631b144 commit fcb0a1c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
],
"require": {
"laravel-enso/core": "^9.0",
"laravel-enso/core": "^10.0",
"laravel-enso/helpers": "^3.0",
"laravel-enso/image-transformer": "^2.0",
"laravel-enso/migrator": "^2.0",
Expand Down
9 changes: 7 additions & 2 deletions src/Models/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class File extends Model

protected $guarded = [];

protected $casts = ['is_public' => 'boolean'];

public function type()
{
return $this->belongsTo(Type::class);
Expand Down Expand Up @@ -196,4 +194,11 @@ public function isImage(BaseFile $file): bool
['file' => "image|mimetypes:{$mimeTypes}"]
)->passes();
}

protected function casts(): array
{
return [
'is_public' => 'boolean',
];
}
}
13 changes: 8 additions & 5 deletions src/Models/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ class Type extends Model

protected $guarded = [];

protected $casts = [
'is_browsable' => 'boolean', 'is_system' => 'boolean',
'is_public' => 'boolean',
];

protected array $rememberableKeys = ['id', 'model'];

public function files()
Expand Down Expand Up @@ -97,4 +92,12 @@ public function move(): void
FileFacade::moveDirectory($from, $to);
}
}

protected function casts(): array
{
return [
'is_browsable' => 'boolean', 'is_system' => 'boolean',
'is_public' => 'boolean',
];
}
}

0 comments on commit fcb0a1c

Please sign in to comment.