Open dillingham opened 2 years ago
FIgure a way to use relationships derived from route or something to get the foreign key Would be nice if AuthorFormation->nest(PostFormation) automatically used $author->posts()
AuthorFormation->nest(PostFormation)
$author->posts()
$results = $this->formation()->nest( $this->parentFormation(), $this->getParentValue() )->results();
currently have to define it on either the formation or override getForeignKey on the model:
class AuthorFormation extends Formation { public $model = User::class; public $foreignKey = 'author_id'; }
FIgure a way to use relationships derived from route or something to get the foreign key Would be nice if
AuthorFormation->nest(PostFormation)
automatically used$author->posts()
currently have to define it on either the formation or override getForeignKey on the model: