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

garethdaine's avatar

Adding Properties to Spark Objects, Such as User

Hey Folks,

Could anyone give me a little direction on how they go about adding properties to the global Spark object and sub-objects, such as User?

I have a couple of methods on my User model that do things like create a secure hash from their email and convert the created_at field to a UNIX timestamp.

I'd like to be able to add this data to properties on the Spark Vue global object.

Any advice is very much appreciated. Thanks.

0 likes
3 replies
garethdaine's avatar

Yes, I've used the custom variables, but I was wondering if there was a way to add properties to the user object?

Please or to participate in this conversation.