Mercurial > packages > magicforger
annotate src/Generator/Model/stubs/model.pivot.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 | b17f81b804ff |
| rev | line source |
|---|---|
| 4 | 1 <?php |
| 2 | |
| 3 namespace {{ namespace }}; | |
| 4 | |
| 5 use Illuminate\Database\Eloquent\Relations\Pivot; | |
| 6 | |
| 7 class {{ class }} extends Pivot | |
| 8 { | |
| 9 // | |
| 5 | 10 |
| 11 /** | |
| 12 * Indicates if the model should be timestamped. | |
|
23
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
13 * By default our pivots will not use timestamps |
| 5 | 14 * |
| 15 * @var bool | |
| 16 */ | |
| 17 public $timestamps = false; | |
| 18 | |
| 19 | |
|
23
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
20 //relations |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
21 |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
22 // BelongsTo |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
23 # {{ belongs_to_relationships }} |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
24 |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
25 // HasMany |
|
24
31109c61ce02
Refactor RelationshipNavigator formatting and implement belongsTo, hasMany, belongsToMany injection in ModelGenerator
Luka Sitas <sitas.luka.97@gmail.com>
parents:
23
diff
changeset
|
26 # {{ has_many_relationships }} |
|
23
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
27 |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
28 // HasManyThrough |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
29 # {{ has_many_through_relationships }} |
| 5 | 30 |
| 4 | 31 } |
