Skip to content

Commit cb5a094

Browse files
committed
[Fix] Minor fix on managesDelete()
1 parent d363aae commit cb5a094

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Eloquent/BaseRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ protected function manageDeletes(int $id, string $method)
578578
{
579579
$this->applyScope();
580580

581-
if (($method === 'forceDelete' || $method === 'restore') && !in_array(SoftDeletes::class, class_uses($this->model)))
581+
if (($method === 'forceDelete' || $method === 'restore') && !in_array(SoftDeletes::class, class_uses($this->model->getModel())))
582582
throw new RepositoryException("Model must implement SoftDeletes Trait to use forceDelete() or restore() method.");
583583

584584
if ($method === 'forceDelete' || $method === 'restore')

0 commit comments

Comments
 (0)