title: Highlight multiple select options after validations fails - Laravel 5.2
body: <p>I'm learning Laravel 5.2 for first time, and I need to repopulate a form when the validation fails.</p>
  
  <p>I was able to do so with single inputs as 'name' or 'description', but I couln't find out how to do it with the 'category' which is a multiple select.</p>
  
  <p>View:</p>
  
  <pre><code>&lt;form action="{{ url('addproduct') }}" method="POST"&gt;
                  {!! csrf_field() !!}
                  &lt;div class="form-group"&gt;
                      &lt;label for="#productName"&gt;Name:&lt;/label&gt;
                      &lt;input id="productName" class="form-control" name="name" type="text" placeholder="Product name" value="{{ old('name') }}"&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="#productDescription"&gt;Description:&lt;/label&gt;
                      &lt;textarea id="productDescription" class="form-control" name="description" rows="3" placeholder="Product description" value="{{ old('description') }}"&gt;&lt;/textarea&gt;
                  &lt;/div&gt;
                  @if ($categories)
                  &lt;div class="form-group"&gt;
                      &lt;label for="#productCategory"&gt;Category:&lt;/label&gt;
                      &lt;select id="productCategory" class="form-control" name="category[]" multiple&gt;
                        @foreach ($categories as $category)
                        &lt;option value="{{ $category-&gt;id }}"&gt;{{ $category-&gt;name }}&lt;/option&gt;
                        @endforeach
                      &lt;/select&gt;
                  &lt;/div&gt;
                  @endif
                  &lt;div class="form-group"&gt;
                      &lt;label for="#productQuantity"&gt;Quantity:&lt;/label&gt;
                      &lt;input id="productQuantity" class="form-control" name="quantity" type="number" min="0" value="0"&gt;
                  &lt;/div&gt;
                  &lt;button class="form-control btn btn-success" type="submit"&gt;Add Product&lt;/button&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>    public function add(Request $request) {
      $data = array();
      $data['msgAdded'] = false;
  
      $data['categories'] = Category::select('name', 'id')-&gt;get();
  
      if ($request-&gt;isMethod('post')) {
          $this-&gt;validate($request, [
              'name' =&gt; 'required|max:50',
              'description' =&gt; 'required|max:200',
              'category' =&gt; 'required',
              'quantity' =&gt; 'required|min:0',
          ]);
  
          $product = new Product;
          $product-&gt;name = $request-&gt;name;
          $product-&gt;description = $request-&gt;description;
          $product-&gt;quantity = $request-&gt;quantity;
          $product-&gt;save();
  
          foreach ($request-&gt;category as $cat) {
              $category = Category::find($cat);
              $category-&gt;products()-&gt;attach($product-&gt;id);
          }
  
          $data['msgAdded'] = true;
      }
  
      $data['view'] = 'addproduct';
      return view('products/add', $data);
  }
  </code></pre>
  
  <p>I would like to know if it can be achieve with blade, or the best way to achieve that.</p>
  
  <p>Thank you!</p>