Skip to content

Commit 74660a6

Browse files
Refactor HasStoredAssets: update method name from getCasts to casts, add type hint for $model.
1 parent 2fce454 commit 74660a6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/StoredAssets/HasStoredAssets.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ protected static function bootHasStoredAssets(): void
3232

3333
private static function initStoredAssetFieldsAndRelations(): void
3434
{
35+
/** @var Model $model */
3536
$model = static::newModelInstance();
36-
foreach ($model->getCasts() as $field => $cast) {
37+
foreach ($model->casts() as $field => $cast) {
3738
$validClass = class_exists($cast) && is_subclass_of($cast, Recipe::class);
3839
if ($validClass && ! $model->isRelation($field)) {
3940
$uuidField = "{$field}_uuid";

0 commit comments

Comments
 (0)