Код: Выделить всё
PricingPlanBenefit
name
string
50
not-nullable
PricingPlanFeature
name
string
50
not-nullable
PricingPlan
name
string
50
not-nullable
price
integer
not-nullable
benefits
OneToMany
PricingPlanBenefit
property:pricingPlan
not-nullable
not-deleteOrphaned
features
ManyToMany
PricingPlanFeature
not-property
Код: Выделить всё
{% for plan in plans %}
[h4]{{plan.name}}[/h4]
${{plan.price}}/mo
[list]
{% for benefit in plan.benefits %}
doctrine
->getRepository(PricingPlan::class)
->findAll();
dd($plans);
return $this->render('pricing/index.html.twig', [
'plans' => $plans,
]);
}
Подробнее здесь: https://stackoverflow.com/questions/787 ... ne-queries