title: laravel Error: Array to string conversion
body: <p>I have gone through every solution I could find over youtube, stakoverflow and other websites. I am using Select2 to add multiple roles but I a consistently getting the same error.  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select id="role" name="role_id[]" multiple='multiple' 
          class="form-control js-example-basic-multiple"&gt;
      @foreach($roles as $role)
          &lt;option value="{{$role-&gt;id}}"&gt;{{$role-&gt;name}}&lt;/option&gt;
      @endforeach
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>DD function is showing perfect result but after that it shows error. </p>
  
  <p><a href="https://i.stack.imgur.com/AvsBo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AvsBo.png" alt="enter image description here"></a>It works perfectly untill I add [] with the name="role_id[]". 
  form action is as under. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>public function store(Request $request)
  {
      $this-&gt;validate($request, [
          'name'=&gt; 'required|string|max:225',
          'status'=&gt; 'required',
          'role_id'=&gt; 'required',
          'email'=&gt; 'required|string|email|max:225|unique:users',
          'password'=&gt; 'required|string|min:6|confirmed'
      ]);
  
      $password = Hash::make($request-&gt;password);
      // dd($request-&gt;all());
  
      $user = new User;
      $user-&gt;name = $request-&gt;name;
      $user-&gt;status = $request-&gt;status;
      $user-&gt;role_id = $request-&gt;role_id;
      $user-&gt;email = $request-&gt;email;
      $user-&gt;password = $password;
      $user-&gt;remember_token;
      $user-&gt;save();
      // $user-&gt;roles()-&gt;sync($request-&gt;roles, false);
      return back()-&gt;with('message', 'User added successfully!!');
  }</code></pre>
  </div>
  </div>
  
  If I validate for integer  'role_id'=> 'required|integer', it shows error <a href="https://i.stack.imgur.com/MV3w3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MV3w3.png" alt="enter image description here"></a></p>
  
  <p>Migration is as under </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>public function up()
      {
          Schema::create('users', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;string('name');
              $table-&gt;unsignedInteger('role_id')-&gt;default(1);
              $table-&gt;boolean('status')-&gt;default(0);
              $table-&gt;string('email')-&gt;unique();
              $table-&gt;string('password');
              $table-&gt;rememberToken();
              $table-&gt;timestamps();
          });
      }</code></pre>
  </div>
  </div>
  </p>