Standardizing things
This commit is contained in:
@@ -107,7 +107,7 @@ class Component extends Model implements HasPresenter
|
||||
];
|
||||
|
||||
/**
|
||||
* Components can belong to a group.
|
||||
* Get the group relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -117,7 +117,7 @@ class Component extends Model implements HasPresenter
|
||||
}
|
||||
|
||||
/**
|
||||
* Lookup all of the incidents reported on the component.
|
||||
* Get the incidents relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ class Component extends Model implements HasPresenter
|
||||
}
|
||||
|
||||
/**
|
||||
* Components can have many tags.
|
||||
* Get the tags relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
|
||||
@@ -93,7 +93,7 @@ class ComponentGroup extends Model implements HasPresenter
|
||||
protected $with = ['enabled_components', 'enabled_components_lowest'];
|
||||
|
||||
/**
|
||||
* A group can have many components.
|
||||
* Get the components relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -117,7 +117,7 @@ class Metric extends Model implements HasPresenter
|
||||
];
|
||||
|
||||
/**
|
||||
* Metrics contain many metric points.
|
||||
* Get the points relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
@@ -63,7 +63,7 @@ class MetricPoint extends Model implements HasPresenter
|
||||
];
|
||||
|
||||
/**
|
||||
* A metric point belongs to a metric unit.
|
||||
* Get the metric relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
|
||||
@@ -71,7 +71,7 @@ class Subscriber extends Model implements HasPresenter
|
||||
}
|
||||
|
||||
/**
|
||||
* A subscriber has many subscriptions.
|
||||
* Get the subscriptions relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,7 @@ class Subscription extends Model
|
||||
];
|
||||
|
||||
/**
|
||||
* A subscription belongs to a subscriber.
|
||||
* Get the subscriber relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
@@ -60,7 +60,7 @@ class Subscription extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* A subscription has one component.
|
||||
* Get the component relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@ class Tag extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Tags can have many components.
|
||||
* Get the components relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user