view src/Generator/Model/snippets/belongs_to_many_relation.stub @ 30:21439512ba69 codex

Fixing issue with conflict of input variables on the request generator.
author Luka Sitas <sitas.luka.97@gmail.com>
date Wed, 18 Jun 2025 09:04:59 -0400
parents 827efbf4d73c
children
line wrap: on
line source


public function {{relationName}}()
{
    return $this->belongsToMany({{relatedModel}}::class, '{{pivotTable}}', '{{foreignPivotKey}}', '{{relatedPivotKey}}');
}