IMMREX7
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class LeaveMaster extends Model {
protected $primaryKey = 'idLeave';
protected $table = 'leavemaster';
protected $fillable = ['idDepartment','idFinancialYear', 'idSchool', 'idDesignation', 'idEmployee', 'paidLeaves','leaveType','max_allowed','sandwich','leave_allocation'];
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');
}
}
Copyright © 2021 -