annotate src/Generator/Model/snippets/has_many_relation.stub @ 24:31109c61ce02 codex

Refactor RelationshipNavigator formatting and implement belongsTo, hasMany, belongsToMany injection in ModelGenerator
author Luka Sitas <sitas.luka.97@gmail.com>
date Tue, 22 Apr 2025 21:37:44 -0400
parents 827efbf4d73c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
31109c61ce02 Refactor RelationshipNavigator formatting and implement belongsTo, hasMany, belongsToMany injection in ModelGenerator
Luka Sitas <sitas.luka.97@gmail.com>
parents: 23
diff changeset
1 public function {{relationName}}()
23
827efbf4d73c Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
diff changeset
2 {
24
31109c61ce02 Refactor RelationshipNavigator formatting and implement belongsTo, hasMany, belongsToMany injection in ModelGenerator
Luka Sitas <sitas.luka.97@gmail.com>
parents: 23
diff changeset
3 return $this->hasMany({{relatedModel}}::class, '{{columnName}}');
23
827efbf4d73c Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
diff changeset
4 }