belongsTo(User::class, 'created_by'); } public function usersUsed() { return $this->belongsToMany(User::class, 'coupon_users') ->withTimestamps(); } }