Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
DataTable Example - Load Data via Ajax
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
<title>DataTable Sample</title>
<!-- Fonts -->
<link href=",600" rel="stylesheet" type="text/css">
<div class="container">
<div class="row m-5">
<div class="col-12">
<table id="book-table" class="table table-striped table-bordered">
<script src="{{ mix('js/app.js') }}"></script>
$(document).ready(function () {
processing: true,
language: {
processing: '<span>Processing</span>',
serverSide: true,
ajax: '{{ route('books.query') }}',
columns: [
{ data: 'name' },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.