Skip to content

Commit c23594c

Browse files
committed
no need class check
1 parent 6d8b498 commit c23594c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/app/Library/CrudPanel/Traits/Relationships.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,6 @@ private function modelMethodIsRelationship($model, $method)
343343
if ($returnType) {
344344
$returnType = $returnType->getName();
345345

346-
// this check is to make sure we don't autoload the class when checking strings instead of objects.
347-
// the third parameter of is_a() allow us to check strings, but it also autoloads the class
348-
// in case it does not exists. The classes we want to check against EXIST.
349-
if(!class_exists($returnType, false)) {
350-
return false;
351-
}
352-
// the above check
353346
if (is_a($returnType, 'Illuminate\Database\Eloquent\Casts\Attribute', true)) {
354347
return false;
355348
}

0 commit comments

Comments
 (0)