Skip to content

Commit 934bdbb

Browse files
committed
Fix getting inheritance type
1 parent cb60f79 commit 934bdbb

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

Diff for: src/Inheritance.php

+1-12
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ trait Inheritance
1414
*/
1515
public static $inheritanceColumn = 'type';
1616

17-
/**
18-
* Defines the type name for use with single table inheritance.
19-
*
20-
* @var mixed
21-
*/
22-
public static $inheritanceType;
23-
2417
/**
2518
* Create a new Eloquent model instance.
2619
*
@@ -79,10 +72,6 @@ protected static function isRootModel()
7972
*/
8073
protected static function getInheritanceType()
8174
{
82-
if (isset(static::$inheritanceType)) {
83-
return static::$inheritanceType;
84-
}
85-
8675
$class = static::class;
8776
$flippedMap = array_flip(static::$inheritanceMap ?? []);
8877

@@ -92,7 +81,7 @@ protected static function getInheritanceType()
9281
$type = $class;
9382
}
9483

95-
return static::$inheritanceType = $type;
84+
return $type;
9685
}
9786

9887
/**

0 commit comments

Comments
 (0)