示例#1
0
 /**
  * Asserts the key is valid for the related model.
  */
 protected function assertValidForeignKey($key)
 {
     if (!in_array($key, $this->relatedDefinition->getColumnMap(), true)) {
         throw new InvalidArgumentException("Invalid key '{$key}' for '{$this->relatedDefinition->getName()}'");
     }
 }
示例#2
0
 /**
  * Returns the model's name.
  * 
  * @return string
  */
 public function getModelName()
 {
     return $this->definition->getName();
 }