title: How to convert array to string in laravel?
body: <p>I am getting input from checkbox values in array using bootstrap form.
  I am using array for storing checkbox values. How i convert this array to string . Because database only take string values.</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;div class="form-group col-md-12"&gt;
      &lt;div class="custom-control custom-checkbox custom-control-inline"&gt;
          &lt;input type="checkbox" id="eduPrimary" name="education[]" 
          class="custom-control-input" value="primary" /&gt;
          &lt;label class="custom-control-label" for="eduPrimary"&gt;primary&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="form-group col-md-12"&gt;
      &lt;div class="custom-control custom-checkbox custom-control-inline"&gt;
          &lt;input type="checkbox" id="eduSecondary" name="education[]" 
          class="custom-control-input" value="secondary" /&gt;
          &lt;label class="custom-control-label" for="eduSecondary"&gt;secondary&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="form-group col-md-12"&gt;
      &lt;div class="custom-control custom-checkbox custom-control-inline"&gt;
          &lt;input type="checkbox" id="eduUniversity" name="education[]" 
          class="custom-control-input" value="university" /&gt;
          &lt;label class="custom-control-label"for="eduUniversity"&gt;university&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In backend i am using laravel to store values to database But it run error that storing array to string in mysql.</p>
  
  <pre><code>public function store(Request $request,AdProfile $adprofile)
  {
      $adprofile-&gt;education = $request-&gt;education[];
      $adprofile-&gt;save();
      return redirect()-&gt;route('adprofile.profilecomplete');
  }
  </code></pre>