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

JakeDeWitt's avatar

Dynamic Developers

The Spark Documentation states that a dynamic list can be used in place of the $developers array, but there is no hint on where to place this:

Spark::developers($developers);

I can easily retrieve a specific team's emails to pass as the parameter, but I can't figure out the placement! Thanks for your help!

0 likes
3 replies
Cronix's avatar
Cronix
Best Answer
Level 67

I believe you'd do that in the SparkServiceProvider. Not sure if it should go in the booted() or register() method. Just make a db call to get the list and populate it as you showed.

1 like
JakeDeWitt's avatar

Yes, it is in the booted method! Thank you! The documentation made me believe that this was reserved for registration commands..

1 like
Cronix's avatar

Good deal. Please mark the post as solved to make it easier for others to find the solution if they come across this.

Please or to participate in this conversation.