mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -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'];
|
||||
|
||||
/**
|
||||
* Show count of assets with status label
|
||||
*
|
||||
* @todo Remove this. It's dumb.
|
||||
* @return Collection
|
||||
*/
|
||||
public function has_assets()
|
||||
{
|
||||
return $this->hasMany('\App\Models\Asset', 'status_id')->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get assets with associated status label
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function assets()
|
||||
{
|
||||
return $this->hasMany('\App\Models\Asset', 'status_id');
|
||||
|
|
Loading…
Reference in a new issue