Skip to content

Commit 83a8d0c

Browse files
authored
Update EntityManagement.php
1 parent b2a183f commit 83a8d0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Traits/EntityManagement.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ protected function getEntityFromModel(string $modelClass) : string
4242
$policy = app(Gate::class)
4343
->getPolicyFor($modelClass);
4444

45+
if (! $policy) {
46+
return "";
47+
}
48+
4549
return $this->getEntity(get_class($policy));
4650
}
4751

0 commit comments

Comments
 (0)