'int', 'metric_id' => 'int', 'value' => 'int', ]; /** * The attributes that are mass assignable. * * @var string[] */ protected $fillable = ['metric_id', 'value', 'created_at']; /** * The validation rules. * * @var string[] */ public $rules = [ 'value' => 'numeric|required', ]; /** * A metric point belongs to a metric unit. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function metric() { return $this->belongsTo(Metric::class, 'id', 'metric_id'); } /** * Get the presenter class. * * @return string */ public function getPresenterClass() { return MetricPointPresenter::class; } }