Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DataTable Example - Book Controller - Load Data via Ajax
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Yajra\DataTables\DataTables;
class BookController extends Controller
{
public function index()
{
return view('book.index');
}
public function query()
{
return Datatables::of(\App\Book::query())
->make(true);
}
}
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.