Mercurial > packages > magicforger
annotate src/Generator/Model/stubs/model.pivot.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 | b0b2e79ad8e6 |
| children | 31109c61ce02 |
| 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 |
|
827efbf4d73c
Huge changes to the relationships for models and more complex
Luka Sitas <sitas.luka.97@gmail.com>
parents:
5
diff
changeset
|
26 # {{ has_may_relationships }} |
|
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 } |
