title: Laravel 5.6 - Registration Form is not working and does not show any error
body: <p>In one of my recent project, the <strong>custom registration form</strong> is not working. When I click on the register button, it reloads the registration form, does not print any error and no data is inserted into the database. Here is the look of the registration form:  </p>
  
  <p><a href="https://i.stack.imgur.com/KJ4Id.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KJ4Id.jpg" alt="enter image description here"></a></p>
  
  <p>Here is the <strong>migration</strong> file code:</p>
  
  <pre><code>public function up()
  {
      Schema::create('users', function (Blueprint $table) {
          $table-&gt;increments('id');
          $table-&gt;string('fname');
          $table-&gt;string('lname');
          $table-&gt;string('email')-&gt;unique();
          $table-&gt;string('contact');
          $table-&gt;string('password');
          $table-&gt;string('created_by');
          $table-&gt;string('modified_by')-&gt;nullable();
          $table-&gt;string('userrole');
          $table-&gt;rememberToken();
          $table-&gt;timestamps();
      });
  }
  </code></pre>
  
  <p>Here is the code of <strong>User</strong> Model:</p>
  
  <pre><code>protected $fillable = [
      'fname', 'lname', 'email', 'password', 'contact', 'created_by', 'userrole',
  ];
  
  protected $hidden = [
      'password', 'remember_token', 'modified_by',
  ];
  </code></pre>
  
  <p>Here is the code of <strong>RegisterController</strong>:</p>
  
  <pre><code>protected function create(array $data)
  {
      return User::create([
          'fname' =&gt; $data['fname'],
          'lname' =&gt; $data['lname'],
          'email' =&gt; $data['email'],
          'contact' =&gt; $data['contact'],
          'created_by' =&gt; $data['email'],
          'userrole' =&gt; Config::get('constants.ROLE_USER'),
          'password' =&gt; Hash::make($data['password']),
      ]);
  }
  </code></pre>
  
  <p>Here is the code of <strong>constants.php</strong>, which is inside <strong>config</strong> folder:</p>
  
  <pre><code>&lt;?php
      return array(
          'ROLE_ADMIN' =&gt; 'ROLE_ADMIN',
          'ROLE_USER' =&gt; 'ROLE_USER'
      );
  </code></pre>
  
  <p>And finally, here is the code of <strong>register.blade.php</strong> file:</p>
  
  <pre><code>@extends('layouts.app')
  
  @section('content')
  &lt;div class="container"&gt;
      &lt;div class="row justify-content-center"&gt;
          &lt;div class="col-md-8"&gt;
              &lt;div class="card"&gt;
                  &lt;div class="card-header bg-dark text-white"&gt;{{ __('Register') }}&lt;/div&gt;
  
                  &lt;div class="card-body"&gt;
                      &lt;form method="POST" action="{{ route('register') }}"&gt;
                          @csrf
  
                          &lt;div class="form-group row"&gt;
                              &lt;label for="fname" class="col-md-4 col-form-label text-md-right"&gt;{{ __('First Name') }}&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="fname" type="text" class="form-control{{ $errors-&gt;has('fname') ? ' is-invalid' : '' }}" name="fname" value="{{ old('fname') }}" required autofocus&gt;
  
                                  @if ($errors-&gt;has('fname'))
                                      &lt;span class="invalid-feedback"&gt;
                                          &lt;strong&gt;{{ $errors-&gt;first('fname') }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group row"&gt;
                              &lt;label for="lname" class="col-md-4 col-form-label text-md-right"&gt;{{ __('Last Name') }}&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="lname" type="text" class="form-control{{ $errors-&gt;has('lname') ? ' is-invalid' : '' }}" name="lname" value="{{ old('lname') }}" required&gt;
  
                                  @if ($errors-&gt;has('lname'))
                                      &lt;span class="invalid-feedback"&gt;
                                          &lt;strong&gt;{{ $errors-&gt;first('lname') }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group row"&gt;
                              &lt;label for="email" class="col-md-4 col-form-label text-md-right"&gt;{{ __('E-Mail Address') }}&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="email" type="email" class="form-control{{ $errors-&gt;has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required&gt;
  
                                  @if ($errors-&gt;has('email'))
                                      &lt;span class="invalid-feedback"&gt;
                                          &lt;strong&gt;{{ $errors-&gt;first('email') }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group row"&gt;
                              &lt;label for="contact" class="col-md-4 col-form-label text-md-right"&gt;{{ __('Contact No') }}&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="contact" type="text" class="form-control{{ $errors-&gt;has('contact') ? ' is-invalid' : '' }}" name="contact" value="{{ old('contact') }}" required&gt;
  
                                  @if ($errors-&gt;has('contact'))
                                      &lt;span class="invalid-feedback"&gt;
                                          &lt;strong&gt;{{ $errors-&gt;first('contact') }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group row"&gt;
                              &lt;label for="password" class="col-md-4 col-form-label text-md-right"&gt;{{ __('Password') }}&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="password" type="password" class="form-control{{ $errors-&gt;has('password') ? ' is-invalid' : '' }}" name="password" required&gt;
  
                                  @if ($errors-&gt;has('password'))
                                      &lt;span class="invalid-feedback"&gt;
                                          &lt;strong&gt;{{ $errors-&gt;first('password') }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group row"&gt;
                              &lt;label for="password-confirm" class="col-md-4 col-form-label text-md-right"&gt;{{ __('Confirm Password') }}&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="password-confirm" type="password" class="form-control" name="password_confirmation" required&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group row mb-0"&gt;
                              &lt;div class="col-md-6 offset-md-5"&gt;
                                  &lt;button type="submit" class="btn btn-primary"&gt;
                                      {{ __('Register') }}
                                  &lt;/button&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
       &lt;/div&gt;
  &lt;/div&gt;
  @endsection
  </code></pre>
  
  <p>Here is a short clip of my problem: <a href="https://bytesoft.tinytake.com/sf/MjU0NDYxNl83NjUxMTg3" rel="nofollow noreferrer">Video Clips</a>  </p>
  
  <p>So, can anyone help me to figure out, what is the actual problem? How can I solve that problem?</p>
  
  <ul>
  <li>Thanks</li>
  </ul>