Level 16
For some of the core methods there is a Spark::swap() available to overwrite it but not sure if this one is covered.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Do you know how i can override the validator() and handle() method for updating the contact information form in the settings tab?
namespace Laravel\Spark\Interactions\Settings\Profile;
class UpdateContactInformation implements Contract
{
/**
* {@inheritdoc}
*/
public function validator($user, array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|unique:users,email,'.$user->id,
]);
}
Is there perhaps something like the Spark::createUsersWith() method like in SparkServiceProvider?
If not, what would be the best way to handle this?
For some of the core methods there is a Spark::swap() available to overwrite it but not sure if this one is covered.
Please or to participate in this conversation.