title: Laravel - Form validation error - argument 2 must be array
body: <p>I'm working with Laravel and every time I submit my form it gives me this error:</p>
  
  <p>ErrorException in Factory.php line 91:
  Argument 2 passed to Illuminate\Validation\Factory::make() must be of the type array, null given, called in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php on line 83 and defined</p>
  
  <p>This is some code for the controller, even when I don't try to send data to the database it gives me this error. (now it's just redirecting)</p>
  
  <pre><code>public function store(StoreProjectRequest $request)
  {
  
  
      return Redirect::to('/index');
  
  }
  </code></pre>
  
  <p>This is how I defined my routes:</p>
  
  <pre><code>Route::get('/projects','ProjectsController@index');
  Route::get('/create','ProjectsController@create');
  
  Route::post('/create','ProjectsController@store');
  </code></pre>
  
  <p>The line the error refers to is what is in the return section here:</p>
  
  <pre><code>protected function getValidatorInstance()
  {
      $factory = $this-&gt;container-&gt;make('Illuminate\Validation\Factory');
  
      if (method_exists($this, 'validator')) {
          return $this-&gt;container-&gt;call([$this, 'validator'], compact('factory'));
      }
  
      return $factory-&gt;make(
          $this-&gt;all(), $this-&gt;container-&gt;call([$this, 'rules']), $this-&gt;messages(), $this-&gt;attributes()
      );
  }
  </code></pre>
  
  <p>Can anyone help me? Thank you!</p>