v8.3.3 - 2018-01-11
- Fixes from PHPStan. #1569, credits to @carusogabriel.
- Enable no_useless_else. #1554, credits to @carusogabriel.
- Remove useless else statements. #1553, credits to @carusogabriel.
- Fix typo. #1536, credits to @Oussama-Tn.
- Test against PHP 7.2. #1532, credits to @carusogabriel.
- Update TestCase with PSR-2. #1496, credits to @gabriel-caruso.
v8.3.2 - 2017-11-02
- Fix datatables() helper and use singleton instance. #1487, credits to @ElfSundae.
- Styling phpdoc for facade. #1489, credits to @ElfSundae.
- Apply StyleCI fixes. #1485, #1483.
- Patch docs. #1492
- Add StyleCI integration. #1484
v8.3.1 - 2017-10-27
- Fix filtered records total when using filterColumn. #1473, credits to @wuwx.
- Added Patreon Link. #1476, credits to @ChaosPower.
- Fix missing periods. #1478, credits to @jiwom.
- Fix PHP Docs and minor array fixes. Remove unused import. #1479, credits to @jiwom.
v8.3.0 - 2017-10-26
ADDED
DataTables
factory class is now Macroable. #1462query()
api added as a replacement forqueryBuilder()
. #1462
CHANGED
- Support for plugin engine methods. #1462, credits to @pimlie.
datatables.builders
config is now optional/redundant. #1462- Deprecate
queryBuilder()
api and replaced withquery()
.
FIXED
- Support for custom engines (eg for mongodb) #1294,
v8.2.0 - 2017-10-25
FIXED
- Fix changelog links. #1449
- Rename phpunit.xml and add composer script. #1460, credits to @pimlie.
- Fix exception/warning for PHP 7.2. #1465, credits to @CristianDeluxe.
- Fix facade method annotations. #1468, credits to @Guja1501.
- Fix globalSearch not working for 0. #1467, credits to @lrtr.
ADDED/CHANGED
v8.1.1 - 2017-10-17
- Fix docs API link. #1438, credits to @dextermb.
- Fix merging config. #1444, credits to @ElfSundae.
- Fix return type. #1446, credits to @gabriel-caruso.
- Remove unused provides() from service provider. #1445, credits to @ElfSundae.
v8.1.0 - 2017-10-08
- Add addColumns() to EloquentDataTable. #1416, credits to @ElfSundae.
v8.0.3 - 2017-09-12
v8.0.2 - 2017-09-06
v8.0.1 - 2017-08-31
- 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.
v8.0.0 - 2017-08-31
- 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.