Files
ismailmasseran be93821fad
Build Docker Image / build-backend (push) Successful in 1m11s
Explore/ismail (#3)
Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Reviewed-on: #3
2026-08-26 16:19:29 +08:00

41 lines
841 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Cawangan extends Model
{
protected $table = 'arrahn_master_db';
protected $connection = 'mysql7';
public $timestamps = false;
/**
* Display name from master table (`details_caw`).
* Keep this as the single mapping so callers do not guess nama/namacaw.
*/
public function getNamaCawanganAttribute()
{
$nama = trim((string) ($this->attributes['details_caw'] ?? ''));
return $nama !== '' ? $nama : (string) ($this->attributes['kodcaw'] ?? '');
}
/**
* The attributes that are mass assignable.
*
* @var array
*/
// protected $fillable = [
// ];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
// protected $hidden = [];
}