/** * Get the note for this property. */ public function note() { $foreignKey = 'strKey'; $localKey = 'strKey'; $instance = new Note(); $instance->setConnection($this->getConnectionName()); //dd($instance->getConnection()); return new HasOne($instance->newQuery(), $this, $foreignKey, $localKey); //return $this->hasOne('App\Note','strKey' ,'strKey' ); }