This might help: https://spark.laravel.com/docs/2.0/adding-registration-fields
Sep 21, 2016
1
Level 4
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!
Please or to participate in this conversation.