| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class Family extends Model |
||
| 13 | { |
||
| 14 | use Commentable, Documentable, Addressable, HasIndividuals, Events; |
||
| 15 | |||
| 16 | protected $fillable = ['description', 'is_active', 'father_id', 'mother_id', 'type_id']; |
||
| 17 | |||
| 18 | protected $attributes = ['is_active' => false]; |
||
| 19 | |||
| 20 | protected $casts = ['is_active' => 'boolean']; |
||
| 21 | |||
| 22 | public function individuals() |
||
| 23 | { |
||
| 24 | return $this->belongsToMany(Individual::class)->withPivot('type_id'); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getIndividualListAttribute() |
||
| 32 | } |
||
| 33 | |||
| 34 | public function info(){ |
||
| 36 | } |
||
| 37 | |||
| 38 | public function spouse(){ |
||
| 42 |