title: Undefined array key "name_of_firm" in laravel?
body: <p>This is my RegisterController (Laravel ui edited). please help me.
  Is i have to add any other page to this question.</p>
  <pre><code>protected function validator(array $data)
  {
      return Validator::make($data, [
          'name' =&gt; ['required', 'string', 'max:255'],
          'email' =&gt; ['required', 'string', 'email', 'max:255', 'unique:users'],
          'password' =&gt; ['required', 'string', 'min:8', 'confirmed'],
      ]);
  }
  
  /**
   * Create a new user instance after a valid registration.
   *
   * @param  array  $data
   * @return \App\Models\User
   */
  protected function create(array $data)
  {
      return User::create([
          'name' =&gt; $data['name'],
          'email' =&gt; $data['email'],
          'password' =&gt; Hash::make($data['password']),
          'name_of_firm' =&gt; $data['name_of_firm'],
          'number' =&gt; $data['number'],
          'address' =&gt; $data['address'],
      ]);
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/KF5FM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KF5FM.png" alt="enter image description here" /></a></p>