Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. public function index(Request $request){
  2. $posts = Datatables::eloquent(Posts::query())->make(true);
  3. return View::make('dashboard.approval', compact('posts'));
  4. }
  5.  
  6. <table class="ui celled table">
  7. <thead>
  8. <tr><th>id</th>
  9. <th>Title</th>
  10. <th>Description</th>
  11. </tr></thead>
  12. <tbody>
  13. @foreach($posts as $post)
  14. <tr>
  15. <td>lsdjflajsdlk</td>
  16. <td>Hello</td>
  17. <td>Hello</td>
  18. </tr>
  19. @endforeach
  20. </tbody>
  21.  
  22. </table>
  23. @endsection
  24.  
  25. <script>
  26. $(document).ready(function(){
  27. $('.table').DataTable({
  28.  
  29. });
  30. });
  31. </script>
  32.  
  33. HTTP/1.0 200 OK Cache-Control: no-cache, private Content-Type: application/json {"draw":0,"recordsTotal":7,"recordsFiltered":7,"data":[{"id":"1",".............],"queries":[{"query":"select count(*) as aggregate from (select '1' as `row_count` from `posts`) count_row_table","bindings":[],"time":70.87},{"query":"select * from `posts`","bindings":[],"time":2.22}],"input":[]}
  34.  
  35. Undefined property: SymfonyComponentHttpFoundationResponseHeaderBag::$id
  36.  
  37. htmlspecialchars() expects parameter 1 to be string, array given
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement