Standardizing things

This commit is contained in:
James Brooks
2016-08-10 10:46:45 +01:00
parent 943f7623a4
commit a947cffcb8
8 changed files with 20 additions and 20 deletions

View File

@@ -91,6 +91,16 @@ class Incident extends Model implements HasPresenter
'message',
];
/**
* Get the component relation.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function component()
{
return $this->belongsTo(Component::class, 'component_id', 'id');
}
/**
* Finds all visible incidents.
*
@@ -131,16 +141,6 @@ class Incident extends Model implements HasPresenter
});
}
/**
* An incident belongs to a component.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function component()
{
return $this->belongsTo(Component::class, 'component_id', 'id');
}
/**
* Returns whether the "incident" is scheduled or not.
*