Your IP : 216.73.216.91


Current Path : /var/www/html/LLCF-APP/app/Models/
Upload File :
Current File : /var/www/html/LLCF-APP/app/Models/Family.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Family extends Model
{
    protected $table = 'family';

    public $timestamps = false;

    const CREATED_AT = 'created_on';
    const UPDATED_AT = 'updated_on';

    protected $fillable = [
        'father_cnic',
        'father_name',
        'father_phone',
        'father_occup',
        'address',
        'religion',
        'children_count',
        'mother_name',
        'mother_cnic',
        'mother_occup',
        'zakat',
        'emerg_name',
        'emerg_relation',
        'emerg_num',
        'created_on',
        'updated_on',
    ];

    public function students(): HasMany
    {
        return $this->hasMany(Student::class, 'family_id');
    }

    public function healthRecords(): HasMany
    {
        return $this->hasMany(Health::class, 'family_id');
    }

    public function familyServices(): HasMany
    {
        return $this->hasMany(FamilyService::class, 'family_id');
    }
}