|
|
@@ -3,7 +3,7 @@
|
|
|
namespace App\Models;
|
|
|
|
|
|
use App\Constants\Util;
|
|
|
-use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
+use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
|
|
|
|
|
class ActivityReward extends BaseModel
|
|
|
@@ -14,9 +14,9 @@ class ActivityReward extends BaseModel
|
|
|
protected $table = 'activity_rewards';
|
|
|
protected $fillable = ['title', 'sub_title', 'detail_image', 'start_time', 'end_time', 'status'];
|
|
|
|
|
|
- public function activityUser(): BelongsTo
|
|
|
+ public function activityUser(): HasMany
|
|
|
{
|
|
|
- return $this->belongsTo(activityUser::class, 'activity_id', 'id');
|
|
|
+ return $this->hasMany(ActivityUser::class, 'activity_id', 'id');
|
|
|
}
|
|
|
|
|
|
protected function getDetailImageAttribute($value)
|