Guest User

Untitled

a guest
Dec 14th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <table class="table table-striped">
  2. <tr>
  3. <?php
  4.  
  5. for ($i=1;$i<=8;$i++)
  6. {
  7. echo "<td>";
  8. echo "<b>Col-".$i."</b><br>";
  9. for ($j=1;$j<=15;$j++)
  10. {
  11.  
  12. echo "Row-".$j."<br>";
  13. }
  14. echo "</td>";
  15. }
  16.  
  17. ?>
  18. </tr>
  19. </table>
  20.  
  21. <form action='/display' method="post">
  22. <table style="table-layout: fixed; width:100%;" border=1>
  23. {!! csrf_field() !!}
  24. <thead>
  25. <tr>
  26. @foreach($todo as $todo)
  27. <td>
  28. {{$todo->status}}
  29. @foreach($todo1 as $todo1)
  30. <table>
  31. <tr>
  32. <td>
  33. {{$todo1->summary}}
  34. </td>
  35. </tr>
  36.  
  37. </table>
  38. @endforeach
  39. </td>
  40. @endforeach
  41. </tr>
  42. </thead>
  43. </table>
  44.  
  45. <?php
  46.  
  47. namespace AppHttpControllers;
  48. use AppTodo;
  49. use IlluminateHttpRequest;
  50. use IlluminateSupportFacadesDB;
  51.  
  52. //use IlluminateDatabaseMySqlConnection;
  53. class TodoController extends Controller
  54. {
  55. public function index()
  56. {
  57.  
  58. $todo=DB::table('todos')->select('status')->groupBy('status')->get();
  59. //dd($todo);
  60. $todo1=DB::table('todos')->where('status','todo')->get();
  61. //dd($todo1);
  62. return view ('display',compact('todo1','todo'));
  63. }
  64. }
  65.  
  66. ErrorException
  67.  
  68. Trying to get property of non-object (View: lar4/resources/views/display.blade.php)
Add Comment
Please, Sign In to add comment