public function find($id, $columns = ['*'])
    {
        return is_array($id) ? $this->findMany($id, $columns) : $this->where(
            $this->getRelated()->getQualifiedKeyName(), '=', $id
        )->first($columns);
    }
public function find($id, $columns = ['*'])
    {
        return is_array($id) ? $this->findMany($id, $columns) : $this->where(
            $this->getRelated()->getQualifiedKeyName(), '=', $id
        )->first($columns);
    }
public function find ( $ id , $ columns = [ '*' ] ) { return is_array ( $ id ) ? $ this -> findMany ( $ id , $ columns ) : $ this -> where ( $ this -> getRelated ( ) -> getQualifiedKeyName ( ) , '=' , $ id ) -> first ( $ columns ) ; }
Find a related model by its primary key.

@param  mixed  $id
@param  array  $columns
@return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|null
Find a related model by its primary key .