Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

With pivot #92

Open
Open
@ronlobo

Description

@ronlobo

Hi,

can somebody explain how
https://github.com/laravelbook/ardent#cleaner-definition-of-relationships--since-20
works with pivot?

e.g. eloquent model relation function:

public function attributes () {
        return $this->belongsToMany('Attribute', collectionAttribute_collection', 'id_collection', 'id_collectionAttribute')->withPivot('value');
    }

now with ardent:

class Collection extends \LaravelBook\Ardent\Ardent {
  public static $relationsData = array(
    'attributes'  => array('belongsToMany', 'Attribute', 'table' => 'collections_have_attributes')
  );
}

where do I add the withPivot('value')?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions