title: separate string from input selected value
body: <p>I have two separate string value from the selected dropdown value. 
  Like</p>
  
  <pre><code>&lt;label&gt;Book ID&lt;/label&gt;&lt;span class="required"&gt;*&lt;/span&gt;
  &lt;select class="js-example-basic-single form-control" name="sel_Book"&gt;
      @foreach ($books as $data)                                       
          &lt;option value="{{ $data-&gt;BookID }}-{{ $data-&gt;BookUnitPrice }}"&gt;{{ $data-&gt;BookName }} --- {{ $data-&gt;BookUnitPrice }}&lt;/option&gt;                                                      
      @endforeach
  &lt;/select&gt;
  </code></pre>
  
  <p>So in the controller, the value is retrieved as <code>BookID-BookUnitPrice</code> eg <code>Eng11-500</code>" from <code>sel_Bookdropdown. So I have to separate this value and set
  </code>Book = Eng11<code>and</code>UnitPrice = 500`. How can I do it?</p>
  
  <p>code block</p>
  
  <pre><code>$booksout -&gt; Distributor = $request-&gt;input('sel_Distributor');
  $booksout -&gt; Book = $request-&gt;input('sel_Book');
  return response()-&gt;json($request); 
  $booksout -&gt; UnitPrice =
  $booksout -&gt; Quantity = $request-&gt;input('DistQuantity');
  </code></pre>