first commit
This commit is contained in:
22
app/Models/Department.php
Normal file
22
app/Models/Department.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Department extends Model
|
||||
{
|
||||
protected $table = 'oms_department';
|
||||
protected $primaryKey = 'departmentid';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'departmentname',
|
||||
'rf_lpuid'
|
||||
];
|
||||
|
||||
public function lpu(): \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
{
|
||||
return $this->hasOne(Lpu::class, 'lpuid', 'rf_lpuid');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user