Skip to content

Commit 6b1394a

Browse files
Remove ::class notation for PHP 5.4 support
1 parent e0bdb29 commit 6b1394a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/CascadeSoftDeletes.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ protected static function bootCascadeSoftDeletes()
2828
foreach ($model->cascadeDeletes as $relationship) {
2929
if (! $model->{$relationship}() instanceof Relation) {
3030
throw new LogicException(sprintf(
31-
'Relationship [%s] must return an object of type %s',
32-
$relationship,
33-
Relation::class
31+
'Relationship [%s] must return an object of type Illuminate\Database\Eloquent\SoftDeletes',
32+
$relationship
3433
));
3534
}
3635

@@ -40,9 +39,14 @@ protected static function bootCascadeSoftDeletes()
4039
}
4140

4241

42+
/**
43+
* Determine if the current model implements soft deletes.
44+
*
45+
* @return bool
46+
*/
4347
protected function implementsSoftDeletes()
4448
{
45-
return in_array(SoftDeletes::class, class_uses($this));
49+
return in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses($this));
4650
}
4751

4852
}

0 commit comments

Comments
 (0)