- Fix compatibility with Lumen. #1382
- Fix #1377.
- Remove void return type.
- Fix #1367, PR #1368.
- Do not resolve column if relation is not eager loaded. #1355
- Fix #1353, sort/search not working when using join statements.
- Add tests for join statements.
- Add support for Laravel 5.5.
- Package auto-discovery implemented.
- Add the raw data to model key when compiling views when using addColumn and editColumn.
- Make multi-term search configurable.
- Source code clean-up, refactoring and type-hinting.
- Improved scrutinizer code quality score from 6 to ~9 pts.
- On the fly support for
SoftDeletes
. No need to usewithTrashed
andonlyTrashed
. - Add
getQuery
api to get the query used by dataTable. - Add
getFilteredQuery
api to get the prepared (filtered, ordered & paginated) query. - Add
Arrayable
andJsonable
interface for a more Laravel like response.
use Yajra\DataTables\Facades\DataTables;
return DataTables::eloquent(User::query())->toJson();
return DataTables::eloquent(User::query())->toArray();
- Introducing a new OOP / intuitive syntax.
// using DataTables Factory
use Yajra\DataTables\DataTables;
return DataTables::of(User::query())->toJson();
return (new DataTables)->eloquent(User::query())->toJson();
return (new DataTables)->queryBuilder(DB::table('users'))->toJson();
return (new DataTables)->collection(User::all())->toJson();
// using DataTable class directly
use Yajra\DataTables\EloquentDataTable;
return (new EloquentDataTable(User::query())->toJson();
use Yajra\DataTables\QueryDataTable;
return (new QueryDataTable(DB::table('users'))->toJson();
use Yajra\DataTables\CollectionDataTable;
return (new CollectionDataTable(User::all())->toJson();
- Add
datatables()
function helper.
- Namespace changed from
Yajra\Datatables
toYajra\DataTables
. - Rename
Datatables
toDataTables
class. - Rename Facade from
Datatables
toDataTables
class. - Preserve
Eloquent\Builder
when overriding the default ordering of dataTables when usingEloquentEngine
. - Preserve
Eloquent\Builder
when using filterColumn api. Allows us to use model scope and any eloquent magics. - Fractal integration extracted to own plugin laravel-datatables-fractal.
- Raw output are always passed on transformer instance.
- Object response is now the default output
public function make($mDataSupport = true)
.
- Remove
filterColumn
api magic query method in favor of closure. - Remove support on older
snake_case
methods. - Remove silly implementation of proxying query builder calls via magic method.
- Removed unused methods.
- Remove
withTrashed
andonlyTrashed
api.
- How to get full used query ? #1068
- Is there a way to build the query (with filtering and sorting) but without execute it? #1234
- Fix orderColumn api where related tables are not joined.
- Fix nested with relation search and sort function.