php - How to access multiple list boxes from view to controller in Laravel -


i developing 1 website want assign orders delivery boys using multiple list boxes given below code.

enter image description here

code of screen given below.

<?php                                             $currentorders = foodycomments::where('comment_date', '<=', new datetime('today'))                                                     ->select('comment_id', 'comment_post_id', 'comment_date')                                                     ->get();                                              $currentorderscount = foodycomments::where('comment_date', '<=', new datetime('today'))                                                             ->get()->count();                                             foreach ($currentorders $currentorders) {                                                 ?>                                                 <tr>                                                     <td>                                                         {{$currentorders->comment_id}}                                                     </td>                                                     <td>                                                         {{$currentorders->comment_post_id}}                                                     </td>                                                     <td>                                                         {{$currentorders->comment_date}}                                                     </td>                                                      <?php                                                     $count = deliverystaffdetails::get()->count();                                                     $c = 1;                                                     $current_orders_count = 1;                                                     ?>                                                      <td><select name="$current_orders_count">                                                             <?php while ($c != $count + 1) { ?>                                                                 <option id ="<?php echo $c; ?>"  value="<?php echo $c; ?>"><?php echo $c; ?></option>                                                                 <?php $c++;                                                             }                                                             ?>                                                         </select>                                                      </td>                                                      <?php $current_orders_count;                                                 }                                                 ?>  

here giving dynamic names different names each list box.

below controller code access list boxes.

public function postorders()  {     $currentorderscount = foodycomments::where('comment_date', '<=', new datetime('today'))->get()->count();      $x=1;     while($x!=$currentorderscount+1) {         $mylist = $_post[$x];         echo $mylist;     } } 

but not working. wrong on here?


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -