title: Argument #1 ($user) must be of type Authenticable, null given
body: <p>Im getting the following error in Laravel when trying to use the create function in RegisterController from Laravel auth. I'm trying to insert data into 2 tables with this function, into the Users table and a table called personas that is associated with the model Persona. The error is this</p>
  <blockquote>
  <p>Illuminate\Auth\SessionGuard::login(): Argument #1 ($user) must be of
  type Illuminate\Contracts\Auth\Authenticatable, null given, called in
  D:\xampp\htdocs\SistemaHNF\vendor\laravel\ui\auth-backend\RegistersUsers.php
  on line 36</p>
  </blockquote>
  <p>This is the code I have in the create function</p>
  <pre><code> protected function create(array $data)
  {
  
      $datos= ['nombre' =&gt; $data['name'],'apellido' =&gt; $data['surname'],'cedula' =&gt; $data['cedula'],'email' =&gt; $data['email'],
      'telefono' =&gt;$data['telefono'],'direccion' =&gt;$data['direccion'],'ciudadResi' =&gt;$data['ciudadResi'],'genero' =&gt;$data['genero'],]; 
      
      
      Persona::create([
          'nombre' =&gt; $datos['nombre'],
          'apellido' =&gt; $datos['apellido'],
          'cedula' =&gt; $datos['cedula'],
          'email' =&gt; $datos['email'],
          'telefono' =&gt;$datos['telefono'],
          'direccion' =&gt;$datos['direccion'],
          'ciudadResi' =&gt;$datos['ciudadResi'],
          'fechaNacimiento' =&gt;'1998-03-05',
          'genero' =&gt;$datos['genero'],
          'estado'=&gt; '1',
          'idTipoPersona'=&gt;'2'
      ]);
      
      
      User::create([
          'name' =&gt; 'clienteUser',
          'surname' =&gt; $data['surname'],
          'email' =&gt; $data['email'],
          'nick' =&gt; $data['nick'],
          'password' =&gt; Hash::make($data['password']),
          'role' =&gt; 'cliente'
      ]);
      
  }
  </code></pre>
  <p>Is it because I'm lacking a return in the function? And if I'm lacking it what should I return because I'm inserting data into 2 tables.
  I'm new to Laravel so sorry if this is a novice mistake, also english isn't my main language, if you need myself to explain better or any other code I can gladly provide it.</p>
  <p>The form I'm using is the form from Register.Blade</p>