IMMREX7
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class AssignOvertime extends Model {
protected $primaryKey = 'idOvertime';
protected $table = 'overtime';
protected $fillable = ['idDepartment','idFinancialYear', 'idSchool', 'idDesignation', 'idEmployee', 'otAfter', 'otRatio'];
public function department() {
return $this->belongsTo(Department::class, 'idDepartment', 'idDepartment');
}
public function designation() {
return $this->belongsTo(Designation::class, 'idDesignation', 'idDesignation');
}
public function shift() {
return $this->belongsTo(Shift::class, 'idShift', 'idShift');
}
public function employee() {
return $this->belongsTo(Employee::class, 'idEmployee', 'idEmployee');
}
}
Copyright © 2021 -