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

bigblueboss's avatar

Registration with Spark!

How can I add a column and a string into each user being created in spark.

It certainly isn't through Laravel 5.3's normal way (App\Http\Controllers\Auth\RegisterController.php) That file isn't really even being used i believe. I deleted the whole create function and registration works fine.

protected function create(array $data)
{
  return User::create([
      'name' => $data['name'],
      'email' => $data['email'],
      'password' => bcrypt($data['password']),
      //I tried to add more information here.. but i guess spark change how laravel 5.3 works
      'verified' => 1,
  ]);
}

It might be this: (vendor\laravel\spark\src\Http\Controllers\Auth\RegisterController.php) under the register function. But I have no idea how to edit this code to include more details as a person is being signed up.

public function register(RegisterRequest $request)
{
  Auth::login($user = Spark::interact(
      Register::class, [$request]
  ));

  event(new UserRegistered($user));

  return response()->json([
      'redirect' => $this->redirectPath()
  ]);
}

Hopefully someone can help!

0 likes
1 reply

Please or to participate in this conversation.