MissingAttributeException.php 564 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Illuminate\Database\Eloquent;
  3. use OutOfBoundsException;
  4. class MissingAttributeException extends OutOfBoundsException
  5. {
  6. /**
  7. * Create a new missing attribute exception instance.
  8. *
  9. * @param \Illuminate\Database\Eloquent\Model $model
  10. * @param string $key
  11. * @return void
  12. */
  13. public function __construct($model, $key)
  14. {
  15. parent::__construct(sprintf(
  16. 'The attribute [%s] either does not exist or was not retrieved for model [%s].',
  17. $key, get_class($model)
  18. ));
  19. }
  20. }