Eager load the metric points.

This commit is contained in:
James Brooks
2015-08-01 20:16:58 +01:00
parent e6db90a798
commit b6de8bf258

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 array
*/
protected $with = ['points'];
/**
* Metrics contain many metric points.
*