Downloads
Stars
Version
This package is a plugin of Laravel DataTables to support searching using Laravel Scout.
composer require yajra/laravel-datatables-scout:^1.0
use Yajra\DataTables\ScoutDataTable;
$model = new App\User;
return (new ScoutDataTable($model))->toJson()
ScoutDataTable
trait on your model.use Yajra\DataTables\Traits\ScoutDataTable;
class User extends Model
{
use ScoutDataTable;
}
Route::get('users/data', function() {
return User::dataTable()->toJson();
});
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.