IMMREX7
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class PtMaster extends Model {
protected $primaryKey = 'idPt';
protected $table = 'pt_master';
protected $fillable = ['idFinancialYear','idDepartment', 'idSchool', 'idDesignation', 'idEmployee', 'gender', 'allowance','allowance_type'];
public function department() {
return $this->belongsTo(Department::class, 'idDepartment', 'idDepartment');
}
public function designation() {
return $this->belongsTo(Designation::class, 'idDesignation', 'idDesignation');
}
public function employee() {
return $this->belongsTo(Employee::class, 'idEmployee', 'idEmployee');
}
public function details() {
return $this->belongsTo(PtMasterDetails::class, 'idPt', 'idPt');
}
}
Copyright © 2021 -