Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function index(Request $request){
- $posts = Datatables::eloquent(Posts::query())->make(true);
- return View::make('dashboard.approval', compact('posts'));
- }
- <table class="ui celled table">
- <thead>
- <tr><th>id</th>
- <th>Title</th>
- <th>Description</th>
- </tr></thead>
- <tbody>
- @foreach($posts as $post)
- <tr>
- <td>lsdjflajsdlk</td>
- <td>Hello</td>
- <td>Hello</td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @endsection
- <script>
- $(document).ready(function(){
- $('.table').DataTable({
- });
- });
- </script>
- 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":[]}
- Undefined property: SymfonyComponentHttpFoundationResponseHeaderBag::$id
- htmlspecialchars() expects parameter 1 to be string, array given
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement