Skip to content

Instantly share code, notes, and snippets.

@omegachien
Created March 10, 2019 06:13
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save omegachien/35eec1e952fc54595ed389e610f8e06d to your computer and use it in GitHub Desktop.
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);
}
}
@tariq099
Copy link

tariq099 commented Aug 5, 2022

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment