How to insert more data when registering a user in Laravel Spark
<p>I'm using Laravel Spark for my latest app and need to insert a random code to a column in the table upon registration.</p>

<p>After A LOT of digging through the code I've found this block of code:</p>

<pre><code>/**
 * Handle a registration request for the application.
 *
 * @param  RegisterRequest  $request
 * @return Response
 */
public function register(RegisterRequest $request)
{
    Auth::login($user = Spark::interact(
        Register::class, [$request]
    ));

    event(new UserRegistered($user));

    return response()-&gt;json([
        'redirect' =&gt; $this-&gt;redirectPath()
    ]);
}
</code></pre>

<p>Which is found in <code>Laravel\Spark\Http\Controllers\Auth\RegisterController;</code></p>

<p>Which I assume is where the code for inserting a user into the database is happening. But I cannot for the life of me work out how to populate a column called <code>confirmation_code</code> with something like <code>13sfet1201</code>.</p>

<p>I'm so stuck on this, so please offer any advice you can.</p>

<p>Thanks in advance,</p>

<p>Andy</p>