mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Better comments on model methods
This commit is contained in:
parent
cde0d49e18
commit
bfc3f69adb
|
@ -23,11 +23,22 @@ class Statuslabel extends Model
|
||||||
|
|
||||||
protected $fillable = ['name'];
|
protected $fillable = ['name'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show count of assets with status label
|
||||||
|
*
|
||||||
|
* @todo Remove this. It's dumb.
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
public function has_assets()
|
public function has_assets()
|
||||||
{
|
{
|
||||||
return $this->hasMany('\App\Models\Asset', 'status_id')->count();
|
return $this->hasMany('\App\Models\Asset', 'status_id')->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get assets with associated status label
|
||||||
|
*
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
public function assets()
|
public function assets()
|
||||||
{
|
{
|
||||||
return $this->hasMany('\App\Models\Asset', 'status_id');
|
return $this->hasMany('\App\Models\Asset', 'status_id');
|
||||||
|
|
Loading…
Reference in a new issue