38 lines
780 B
PHP
Executable File
38 lines
780 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class CawanganKpi extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $table = 'cawangan_kpi';
|
|
|
|
protected $fillable = [
|
|
'caw_id',
|
|
'kodcaw',
|
|
'status_jana',
|
|
];
|
|
|
|
public function cawangan()
|
|
{
|
|
return $this->belongsTo(Cawangan::class, 'caw_id', 'id');
|
|
}
|
|
public function dataKpi()
|
|
{
|
|
return $this->hasMany(DataKpi::class, 'namastaff', 'namastaff');
|
|
}
|
|
|
|
// public function cawangan()
|
|
// {
|
|
// return $this->belongsTo(Cawangan::class, 'caw_id', 'id');
|
|
// }
|
|
|
|
// public function notis()
|
|
// {
|
|
// return $this->belongsTo(Notis::class, 'notis_id', 'id');
|
|
//}
|
|
}
|