19 lines
493 B
PHP
19 lines
493 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MappingUnitPegawai extends Model
|
|
{
|
|
protected $connection = 'dbSmartv1'; // nama connection di config/database.php
|
|
protected $table = 'mappegawaijabatantounitkerja_m'; // atau 'public.pegawai_m' kalau pakai schema
|
|
protected $primaryKey = 'id';
|
|
protected $with = ['pegawai'];
|
|
|
|
public function pegawai(){
|
|
return $this->belongsTo(Pegawai::class, 'objectpegawaifk', 'id');
|
|
}
|
|
|
|
}
|