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

saqueib's avatar

add additional name field in laravel spark update member modal

I want to add some extra fields in Spark model form when we click on edit a member. Out of the box currently, Spark gives only role dropdown, I have added name field in this, box but How can save updated name in DB.

I have checked the route and found

Laravel\Spark\Http\Controllers\Settings\Teams\TeamMemberController@update

Is handling the update method. This controller delegates updation and validation to this class

Laravel\Spark\Interactions\Settings\Teams\UpdateTeamMember

I want to use Spark::swap() but It's not working

Spark::swap('UpdateTeamMember', 'App\Swap\UpdateTeamMember');

Please help to solve it.

0 likes
1 reply
vmitchell85's avatar

I think you need to swap method implementations not class implementations.

So it would possibly be Spark::swap('UpdateTeamMember@handle', 'App\Swap\UpdateTeamMember@handle');

Please or to participate in this conversation.