title: Laravel 5.8 says "array_map(): Expected parameter 2 to be an array, int given"
body: <p>I can't handle this error says "array_map(): Expected parameter 2 to be an array, int given" on Laravel 5.8</p>
  
  <p>Basically, I'm trying to create a new record as I've always done, but today get some new error. LOL</p>
  
  <p>This is my controller about store method</p>
  
  <pre><code> public function store(Request $request)
      {
          $request-&gt;validate([
          'deadline' =&gt; 'required|date',
          'category' =&gt; 'required',
          'title' =&gt; 'required|max:255',
          'street_name' =&gt; 'required|max:255',
          'street_number' =&gt; 'required|numeric',
          'city' =&gt; 'required|max:255',
          'chief_town' =&gt; 'required|max:255',
          'zipcode' =&gt; 'required|numeric',
          'region' =&gt; 'required|max:255',
          'country' =&gt; 'required',
          'short_description' =&gt; 'required|max:255',
          'description' =&gt; 'required|max:255',
          'prize_description' =&gt; 'required|max:255',
          'prizegiving_description' =&gt; 'required|max:255',
          'brief' =&gt; 'required|max:255',
          'max_winner' =&gt; 'required|numeric',
        ]);
  
        Opportunity::create($request-&gt;all());
        return redirect('/opportunity');
      }
  
  </code></pre>
  
  <p>my raw create.blade.php </p>
  
  <pre><code>
  &lt;form method="post" action="/opportunity"&gt;
          &lt;div class="form-group"&gt;
              @csrf
              &lt;label for="title"&gt;title:&lt;/label&gt;
              &lt;input type="text" class="form-control" name="title"/&gt;
              &lt;label for="deadline"&gt;deadline :&lt;/label&gt;
              &lt;input type="date" class="form-control" name="deadline"/&gt;
              &lt;label for="category"&gt;category :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="category"/&gt;
              &lt;label for="street_name"&gt;street_name :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="street_name"/&gt;
              &lt;label for="street_number"&gt;street_number :&lt;/label&gt;
              &lt;input type="number" class="form-control" name="street_number"/&gt;
              &lt;label for="city"&gt;city :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="city"/&gt;
              &lt;label for="chief_town"&gt;chief_town :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="chief_town"/&gt;
              &lt;label for="zipcode"&gt;zipcode :&lt;/label&gt;
              &lt;input type="number" class="form-control" name="zipcode"/&gt;
              &lt;label for="region"&gt;region :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="region"/&gt;
              &lt;label for="short_description"&gt;short_description :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="short_description"/&gt;
              &lt;label for="country"&gt;country :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="country"/&gt;
              &lt;label for="description"&gt;description :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="description"/&gt;
              &lt;label for="prize_description"&gt;prize_description :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="prize_description"/&gt;
              &lt;label for="prizegiving_description"&gt;prizegiving_description :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="prizegiving_description"/&gt;
              &lt;label for="brief"&gt;brief :&lt;/label&gt;
              &lt;input type="text" class="form-control" name="brief"/&gt;
              &lt;label for="max_winner"&gt;max_winner :&lt;/label&gt;
              &lt;input type="number" class="form-control" name="max_winner"/&gt;
          &lt;/div&gt;
              &lt;button type="submit" class="btn btn-primary"&gt;Create&lt;/button&gt;
      &lt;/form&gt;
  
  </code></pre>
  
  <p>my DB table</p>
  
  <pre><code>
  public function up()
      {
          Schema::create('opportunities', function (Blueprint $table) {
              $table-&gt;bigIncrements('id');
              $table-&gt;string('title');
              $table-&gt;date('deadline');
              $table-&gt;string('category')-&gt;default('Care', 'Dres', 'Food', 'Home', 'Host', 'Job', 'Talk');
              $table-&gt;string('street_name');
              $table-&gt;integer('street_number');
              $table-&gt;string('city');
              $table-&gt;string('chief_town');
              $table-&gt;integer('zipcode');
              $table-&gt;string('region');
              $table-&gt;string('country')-&gt;default('Italy');
              $table-&gt;text('short_description');
              $table-&gt;text('description');
              $table-&gt;text('prize_description');
              $table-&gt;text('prizegiving_description');
              $table-&gt;text('brief');
              $table-&gt;integer('max_winner');
              $table-&gt;timestamps();
          });
      }
  </code></pre>
  
  <p>my opportunity.php</p>
  
  <pre><code>class Opportunity extends Model
  {
      protected $fillable = [
      'company_id',
      'deadline',
      'category',
      'title',
      'street_name',
      'street_number',
      'city',
      'chief_town',
      'zipcode',
      'region',
      'country',
      'short_description',
      'description',
      'prize_description',
      'prizegiving_description',
      'brief',
      'max_winner',
       ];
  }
  </code></pre>
  
  <p>Let me know if you need anything else to investigate, thanks to MS</p>
  
  <p>This is the results of typing <code>Log::info($request-&gt;all());</code>
  in the controller</p>
  
  <pre><code>#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions-&gt;handleError(2, 'array_map(): Ex...', '/Users/MatteoSi...', 92, Array)
  #1 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php(92): array_map(Array, 1)
  #2 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php(71): Illuminate\\Validation\\ValidationRuleParser-&gt;explodeExplicitRule(1)
  #3 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php(49): Illuminate\\Validation\\ValidationRuleParser-&gt;explodeRules(Array)
  #4 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(840): Illuminate\\Validation\\ValidationRuleParser-&gt;explode(Array)
  #5 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(823): Illuminate\\Validation\\Validator-&gt;addRules(Array)
  #6 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(213): Illuminate\\Validation\\Validator-&gt;setRules(Array)
  #7 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/Factory.php(151): Illuminate\\Validation\\Validator-&gt;__construct(Object(Illuminate\\Translation\\Translator), Array, Array, Array, Array)
  #8 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/Factory.php(101): Illuminate\\Validation\\Factory-&gt;resolve(Array, Array, Array, Array)
  #9 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Validation/Factory.php(136): Illuminate\\Validation\\Factory-&gt;make(Array, Array, Array, Array)
  #10 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php(53): Illuminate\\Validation\\Factory-&gt;validate(Array, Array)
  #11 [internal function]: Illuminate\\Http\\Request-&gt;Illuminate\\Foundation\\Providers\\{closure}(Array)
  #12 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php(110): call_user_func_array(Object(Closure), Array)
  #13 /Users/MatteoSiri/Documents/sites/iNvisibili/app/Http/Controllers/OpportunityController.php(68): Illuminate\\Http\\Request-&gt;__call('validate', Array)
  #14 [internal function]: Invisibili\\Http\\Controllers\\OpportunityController-&gt;store(Object(Illuminate\\Http\\Request))
  #15 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
  #16 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller-&gt;callAction('store', Array)
  #17 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher-&gt;dispatch(Object(Illuminate\\Routing\\Route), Object(Invisibili\\Http\\Controllers\\OpportunityController), 'store')
  #18 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route-&gt;runController()
  #19 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Routing/Router.php(680): Illuminate\\Routing\\Route-&gt;run()
  #20 /Users/MatteoSiri/Documents/sites/iNvisibili/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  </code></pre>