Skip to content

Commit 40d3f76

Browse files
refactor: Make isSoftDeletable method static
1 parent 8c1a624 commit 40d3f76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Concerns/ManageEloquent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ public function getRelationType($relationName): string
127127
* @param array|string|null $columns Optionally limit the check to a set of columns.
128128
* @return bool
129129
*/
130-
public function isSoftDeletable(): bool
130+
public static function isSoftDeletable(): bool
131131
{
132132
// Model must have the trait
133-
return in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses_recursive($this));
133+
return in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses_recursive(static::class));
134134
}
135135

136136
/**

0 commit comments

Comments
 (0)