| 1 |
<?php |
| 2 |
|
| 3 |
namespace IAWPSCOPED\Illuminate\Database; |
| 4 |
|
| 5 |
use RuntimeException; |
| 6 |
/** @internal */ |
| 7 |
class ClassMorphViolationException extends RuntimeException |
| 8 |
{ |
| 9 |
/** |
| 10 |
* The name of the affected Eloquent model. |
| 11 |
* |
| 12 |
* @var string |
| 13 |
*/ |
| 14 |
public $model; |
| 15 |
/** |
| 16 |
* Create a new exception instance. |
| 17 |
* |
| 18 |
* @param object $model |
| 19 |
*/ |
| 20 |
public function __construct($model) |
| 21 |
{ |
| 22 |
$class = \get_class($model); |
| 23 |
parent::__construct("No morph map defined for model [{$class}]."); |
| 24 |
$this->model = $class; |
| 25 |
} |
| 26 |
} |
| 27 |
|