ClassMorphViolationException.php 525 B

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