Mercurial > packages > magicforger
diff src/Generator/Model/snippets/belongs_to_many_relation.stub @ 23:827efbf4d73c main-dev
Huge changes to the relationships for models and more complex
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Fri, 11 Apr 2025 20:50:20 -0400 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Generator/Model/snippets/belongs_to_many_relation.stub Fri Apr 11 20:50:20 2025 -0400 @@ -0,0 +1,6 @@ + +public function {{relationName}}() +{ + return $this->belongsToMany({{relatedModel}}::class, '{{pivotTable}}', '{{foreignPivotKey}}', '{{relatedPivotKey}}'); +} +
