Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sses80's avatar

Custom invitation functionality for users

I'm trying to implement some custom functionality to link invited users with the inviter.

My goal is handle an invitation token at the registration page, which is linked to a row in a database table.

So, for example, if the user follow the link http://testapp.dev/register/7h51fi1364617523675 - he will get redirected to the default registration page. But, when the user hits the "Register" button, I want to grab the token, find information relevant to the token (a foreign key id) and populate the newly created user row with the information returned from the token.

I have not even come close to a solution and if I extend a custom RegisterController with the spark registration methods - I can't include extra fields in routes.

Any suggestions on how I could tackle this problem?

0 likes
2 replies
sses80's avatar

I've tried using query parameters as well but it's just as confusing due to the fact that the documentation only shows you how to add an additional registration field with an empty value. If you set a value in the blade template for a vue model - it gets ignored.

EventFellows's avatar

have you checked the possibility to 'swap' methods in spark?

that should help you create your setup.

Please or to participate in this conversation.