getKey() 공개 메소드

Get the value of the model's primary key.
public getKey ( ) : mixed
리턴 mixed
예제 #1
0
 /**
  * Associate the model instance to the given parent.
  *
  * @param  \LMongo\Eloquent\Model  $model
  * @return \LMongo\Eloquent\Model
  */
 public function associate(Model $model)
 {
     $this->parent->setAttribute($this->foreignKey, $model->getKey());
     return $this->parent->setRelation($this->relation, $model);
 }