Snipe-IT
Open Source Asset Management
FEATURES
DEMO
DOWNLOAD
DOCUMENTATION
HOSTED SOLUTION
SUPPORT
Intro
Namespaces
Classes
Files
Misc
snipe-it
app
Models
LicenseSeat.php
Go to the documentation of this file.
1
<?php
2
namespace
App\Models
;
3
4
use
Illuminate\Database\Eloquent\Model
;
5
use
Illuminate\Database\Eloquent\SoftDeletes
;
6
7
class
LicenseSeat
extends
Model implements
ICompanyableChild
8
{
9
use
CompanyableChildTrait
;
10
use
SoftDeletes
;
11
12
protected
$dates
= [
'deleted_at'
];
13
protected
$guarded
=
'id'
;
14
protected
$table
=
'license_seats'
;
15
16
public
function
getCompanyableParents
()
17
{
18
return
[
'asset'
,
'license'
];
19
}
20
21
public
function
license
()
22
{
23
return
$this->belongsTo(
'\App\Models\License'
,
'license_id'
);
24
}
25
26
public
function
user
()
27
{
28
return
$this->belongsTo(
'\App\Models\User'
,
'assigned_to'
)->withTrashed();
29
}
30
31
public
function
asset
()
32
{
33
return
$this->belongsTo(
'\App\Models\Asset'
,
'asset_id'
)->withTrashed();
34
}
35
}
App\Models\LicenseSeat\$guarded
$guarded
Definition:
LicenseSeat.php:13
App\Models\LicenseSeat
Definition:
LicenseSeat.php:7
App\Models\LicenseSeat\getCompanyableParents
getCompanyableParents()
Definition:
LicenseSeat.php:16
CompanyableChildTrait
App\Models\LicenseSeat\asset
asset()
Definition:
LicenseSeat.php:31
App\Models\ICompanyableChild
Definition:
ICompanyableChild.php:4
Model
App\Models\LicenseSeat\$table
$table
Definition:
LicenseSeat.php:14
SoftDeletes
App\Models\LicenseSeat\$dates
$dates
Definition:
LicenseSeat.php:12
App\Models
Definition:
Accessory.php:2
SoftDeletes
App\Models\LicenseSeat\user
user()
Definition:
LicenseSeat.php:26
App\Models\LicenseSeat\license
license()
Definition:
LicenseSeat.php:21