Merge pull request #847 from cachethq/eager-load-metric-points

Eager load the metric points.
This commit is contained in:
Graham Campbell
2015-08-01 21:01:10 +01:00

View File

@@ -59,6 +59,13 @@ class Metric extends Model implements HasPresenter
*/
protected $fillable = ['name', 'suffix', 'description', 'display_chart', 'default_value', 'calc_type'];
/**
* The relations to eager load on every query.
*
* @var string[]
*/
protected $with = ['points'];
/**
* Metrics contain many metric points.
*