'array', 'register_platforms' => 'array', 'register_time_limited' => 'boolean', 'deposit_limited' => 'boolean', 'show_ineligible' => 'boolean', 'reward_quota' => 'integer', 'rewarded_count' => 'integer', 'quota_enabled' => 'boolean', 'budget' => 'decimal:2', 'budget_used' => 'decimal:2', 'deposit_min' => 'decimal:2', 'deposit_max' => 'decimal:2', 'sort' => 'integer', ]; public function activityUser(): HasMany { return $this->hasMany(ActivityUser::class, 'activity_id', 'id'); } protected function getDetailImageAttribute($value) { return Util::ensureUrl($value); } protected function setDetailImageAttribute($value) { $this->attributes['detail_image'] = Util::replacePartInUrl($value); } protected function getPcImageAttribute($value) { return Util::ensureUrl($value); } protected function setPcImageAttribute($value) { $this->attributes['pc_image'] = Util::replacePartInUrl($value); } protected function getStartTimeAttribute($value): string { return date('Y-m-d', $value); } protected function getEndTimeAttribute($value): string { return date('Y-m-d', $value); } }