Guest User

Untitled

a guest
Apr 24th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. $datos = $request->input("select");
  2.  
  3. $precio = $request->input("Precio");
  4.  
  5. $estudios =$request->input('CheckEstudio');
  6.  
  7. $conte = count($estudios);
  8.  
  9.  
  10.  
  11. foreach ($estudios as $key) {
  12. $sql2[]=DB::table('actividades')
  13. ->join('proyectos','actividades.id_actividad','proyectos.id_actividad')
  14. ->select('nombre_actividad')
  15. ->where('proyectos.id_estudio',$key)->get();
  16.  
  17.  
  18. }
  19.  
  20. array:4 [▼
  21. 0 => array:11 [▼
  22. 0 => {#188 ▼
  23. +"nombre_actividad": "2 MODELADO DEL SISTEMA"
  24. }
  25. 1 => {#183 ▼
  26. +"nombre_actividad": "ANÁLISIS FLUJO DE CARGA"
  27. }
  28. 2 => {#185 ▼
  29. +"nombre_actividad": "ANÁLISIS DE CORTO CIRCUITO "
  30. }
  31. 3 => {#181 ▼
  32. +"nombre_actividad": "ANÁLISIS DE PÉRDIDAS DEL SISTEMA "
  33. }
  34. 4 => {#189 ▶}
  35. 5 => {#186 ▶}
  36. 6 => {#187 ▶}
  37. 7 => {#190 ▶}
  38. 8 => {#191 ▶}
  39. 9 => {#192 ▶}
  40. 10 => {#193 ▶}
  41. ]
  42. 1 => array:8 [▶]
  43. 2 => array:4 [▶]
  44. 3 => array:4 [▶]
  45. ]
  46.  
  47. return view('actividades',compact('datos','count','consultaActividades','sql2','precio'));
  48. // dd($sql2) ;
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. }
  57.  
  58. }
  59.  
  60. @foreach($sql2 as $sql)
  61. <tr>
  62. <td>{{ $sql->nombre_actividad }}</td>
  63.  
  64. {{-- @php
  65. for ($i=0; $i < $count ; $i++) {
  66.  
  67. echo '<td><input type="text" name"txt[]" value="'.$precio.'"></td>';
  68. }
  69.  
  70. @endphp --}}
  71.  
  72. <fieldset id="fieldt"></fieldset>
  73.  
  74. </tr>
  75.  
  76. @endforeach
Add Comment
Please, Sign In to add comment