Standardizing things
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user