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
Description
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!