/home/techb158/ileadtechnology.com/SSM/app/Models/configuration/asset
NameSizeModeActions
Building.php13570644editdlrm
Room.php14440644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/app/Models/configuration/asset/Building.php (1357B)
'array']; protected $primaryKey = 'id'; protected $table = 'buildings'; protected static $logName = 'building'; protected static $logFillable = true; protected static $logOnlyDirty = true; protected static $ignoreChangedAttributes = ['updated_at']; public function rooms() { return $this->hasMany('App\Models\Configuration\Asset\Room'); } public function getOption(string $option) { return array_get($this->options, $option); } public function scopeInfo($q) { return $q->with('rooms'); } public function scopeFilterById($q, $id) { if (! $id) { return $q; } return $q->where('id', '=', $id); } public function scopeFilterByName($q, $name, $s = 0) { if (! $name) { return $q; } return ($s) ? $q->where('name', '=', $name) : $q->where('name', 'like', '%'.$name.'%'); } }