public function add($object, $defaults = [])
    {
        if (!is_array($defaults)) {
            $defaults = ['name' => $defaults];
        }

        $defaults['join'] = $this;

        return $this->owner->add($object, $defaults);
    }
public function add($object, $defaults = [])
    {
        if (!is_array($defaults)) {
            $defaults = ['name' => $defaults];
        }

        $defaults['join'] = $this;

        return $this->owner->add($object, $defaults);
    }
public function add ( $ object , $ defaults = [ ] ) { if ( ! is_array ( $ defaults ) ) { $ defaults = [ 'name' => $ defaults ] ; } $ defaults [ 'join' ] = $ this ; return $ this -> owner -> add ( $ object , $ defaults ) ; }
Adds any object to owner model.

@param object|string $object
@param array         $defaults

@return object
Adds any object to owner model .