view src/Generator/Model/snippets/belongs_to_many_relation.stub @ 39:b5c6ebd33547 ls_dev_2025_09

Improving the factories, tests, and requests
author Luka Sitas <sitas.luka.97@gmail.com>
date Thu, 25 Sep 2025 23:16:13 -0400
parents 827efbf4d73c
children
line wrap: on
line source


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