mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 13:14:07 -08:00
Added license seat location method
This commit is contained in:
parent
c31362655c
commit
af7b7664c5
|
@ -34,4 +34,17 @@ class LicenseSeat extends Model implements ICompanyableChild
|
|||
{
|
||||
return $this->belongsTo('\App\Models\Asset', 'asset_id')->withTrashed();
|
||||
}
|
||||
|
||||
public function location()
|
||||
{
|
||||
if (($this->user) && ($this->user->location)) {
|
||||
return $this->user->location;
|
||||
|
||||
} elseif (($this->asset) && ($this->asset->location)) {
|
||||
return $this->asset->location;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue