title: Laravel validating an input array
body: <p>I'm new to this laravel. I have this codes from another developer. Now the client want to update the order form products to put in into checkbox the list of products.</p>
  
  <p>Here how product blade looks like:</p>
  
  <pre><code>&lt;input type="checkbox" name="product[]" value="{{ $pp-&gt;name }}"&gt; {{ $pp-&gt;name }}&lt;br /&gt;
  </code></pre>
  
  <p>and below is the controller: I get "ARRAY" printed as result. Can anyone help me how to get the product array values from checkbox. </p>
  
  <pre><code>function post_sendorder(){
  
  $rules = array(
      'name' =&gt; 'required|min:2',
      'email' =&gt; 'required|email',
      'phone' =&gt; 'required|alpha_dash',
      'message' =&gt; 'required|min:5',
  'product' =&gt; 'required'
  );
  
  $v = Validator::make(Input::all(), $rules);
  $v = $v-&gt;fails() ? $v : true;
  
  if($v !== true) return Redirect::to_route('prods')-&gt;with_errors($v-&gt;errors)-&gt;with_input()-&gt;with('show_order',true);
  
  Message::send(function($message){
          $message-&gt;to('mail@gmail.com');         
          $message-&gt;from(Input::get('email'), Input::get('name'));
          $message-&gt;subject('Keratin Product Order Form');
          $message-&gt;body(
              '&lt;!doctype html&gt;
              &lt;html&gt;
              &lt;body&gt;'.
              'Name: '.Input::get('name').'&lt;br /&gt;'.
              'Email: '.Input::get('email').'&lt;br /&gt;'.
              'Phone: '.Input::get('phone').'&lt;br /&gt;'.     
              'Product Ordered:' .Input::get('product'). '&lt;br /&gt;'.
              'Message: '.Input::get('message').'&lt;br /&gt;'.
              '&lt;/body&gt;
  &lt;/html&gt;'
          );
  
          $message-&gt;html(true);
  
      });
  
      if(Message::was_sent()){
          return Redirect::to_route('prods')-&gt;with('s-message','Your Order     Form has been successfully sent!')-&gt;with('show_order',true);
      }else{
          return Redirect::to_route('prods')-&gt;with('e-message','Sending Failed!')-&gt;with('show_order',true);
      }   
  
  }
  </code></pre>