Skip to content

Commit fcb0a1c

Browse files
upgrade L11
1 parent 631b144 commit fcb0a1c

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
],
2121
"require": {
22-
"laravel-enso/core": "^9.0",
22+
"laravel-enso/core": "^10.0",
2323
"laravel-enso/helpers": "^3.0",
2424
"laravel-enso/image-transformer": "^2.0",
2525
"laravel-enso/migrator": "^2.0",

src/Models/File.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class File extends Model
3030

3131
protected $guarded = [];
3232

33-
protected $casts = ['is_public' => 'boolean'];
34-
3533
public function type()
3634
{
3735
return $this->belongsTo(Type::class);
@@ -196,4 +194,11 @@ public function isImage(BaseFile $file): bool
196194
['file' => "image|mimetypes:{$mimeTypes}"]
197195
)->passes();
198196
}
197+
198+
protected function casts(): array
199+
{
200+
return [
201+
'is_public' => 'boolean',
202+
];
203+
}
199204
}

src/Models/Type.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ class Type extends Model
2222

2323
protected $guarded = [];
2424

25-
protected $casts = [
26-
'is_browsable' => 'boolean', 'is_system' => 'boolean',
27-
'is_public' => 'boolean',
28-
];
29-
3025
protected array $rememberableKeys = ['id', 'model'];
3126

3227
public function files()
@@ -97,4 +92,12 @@ public function move(): void
9792
FileFacade::moveDirectory($from, $to);
9893
}
9994
}
95+
96+
protected function casts(): array
97+
{
98+
return [
99+
'is_browsable' => 'boolean', 'is_system' => 'boolean',
100+
'is_public' => 'boolean',
101+
];
102+
}
100103
}

0 commit comments

Comments
 (0)