Mercurial > packages > magicforger
comparison src/Generator/Model/stubs/model.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 | 3426c7e91c24 |
| children | 31109c61ce02 |
comparison
equal
deleted
inserted
replaced
| 22:ee8ef14e158d | 23:827efbf4d73c |
|---|---|
| 25 */ | 25 */ |
| 26 protected $attributes = [ | 26 protected $attributes = [ |
| 27 # {{ atributeInsertPoint }} | 27 # {{ atributeInsertPoint }} |
| 28 ]; | 28 ]; |
| 29 | 29 |
| 30 protected $fillable =[ | |
| 31 # {{ fillableInsertPoint }} | |
| 32 ]; | |
| 33 | |
| 30 | 34 |
| 31 public static function boot() : void { | 35 public static function boot() : void { |
| 32 parent::boot(); | 36 parent::boot(); |
| 33 | 37 |
| 34 self::creating(function ($item) { | 38 self::creating(function ($item) { |
| 43 | 47 |
| 44 | 48 |
| 45 //relations | 49 //relations |
| 46 | 50 |
| 47 // BelongsTo | 51 // BelongsTo |
| 52 # {{ belongs_to_relationships }} | |
| 48 | 53 |
| 49 // HasMany | 54 // HasMany |
| 55 # {{ has_may_relationships }} | |
| 50 | 56 |
| 57 // HasManyThrough | |
| 58 # {{ has_many_through_relationships }} | |
| 51 | 59 |
| 52 } | 60 } |
