IMMREX7
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class AssignShift extends Model {
protected $primaryKey = 'idAssignedShift';
protected $table = 'assigned_shift';
protected $fillable = ['idDepartment', 'idSchool', 'idDesignation', 'idEmployee','idFinancialYear','idShift'];
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 -