Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local> Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
@@ -11,6 +11,17 @@ class Cawangan extends Model
|
||||
|
||||
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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user