IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/app/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/app/School.php

<?php

namespace App;

use App\Traits;
use Illuminate\Database\Eloquent\Model;

class School extends Model {

    use Traits\AutoUpdateUserColumns;

    protected $primaryKey = 'idSchool';
    protected $table = 'schools';
    protected $fillable = ['pg_start','pg_stop','schoolCode', 'schoolName', 'smsUsername', 'smsPassword', 'smsSenderId', 'userName', 'userEmail', 'schoolLogo', 'contactPerson', 'idState', 'idCountry','city', 'userMobile','appFee',
        'street', 'landmark','regPaymentLink', 'subArea', 'area', 'telephone','Device_ID' ,'mobile', 'email', 'website', 'userCity', 'userPincode','gpsLink','userId','gpsPassword','sms_regard_text','smsmode','api_token','notificationmode'];

    public function state() {
        return $this->belongsTo(State::class, 'idState', 'idState');
    }

    public function qatar() {
        return $this->belongsTo(StateQatar::class, 'idState', 'idState');
    }
    
    public function schuser() {
        return $this->belongsTo(SchoolUser::class, 'idSchool', 'idSchool')->where('isSchool','=','Y');
    }
    
    public function templates() {
         return $this->hasMany(SchoolSmsTemplate::class, 'idSchool', 'idSchool');
    }

}

Copyright © 2021 - 2025 IMMREX7