Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.1, 8.0]
laravel: ['9.*', '10.*', '11.*', '12.*']
php: ['8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
laravel: ['9.*', '10.*', '11.*', '12.*', '13.*']
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
Expand All @@ -24,6 +24,8 @@ jobs:
testbench: 9.*
- laravel: 12.*
testbench: 10.*
- laravel: 13.*
testbench: 11.*
exclude:
- laravel: 10.*
php: 8.0
Expand All @@ -35,6 +37,12 @@ jobs:
php: 8.1
- laravel: 12.*
php: 8.0
- laravel: 13.*
php: '8.0'
- laravel: 13.*
php: '8.1'
- laravel: 13.*
php: '8.2'

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.0.0] - 2026-03-21
### Added
- Support for Laravel 13.x

## [5.0.0] - 2025-02-26
### Added
- Support for Laravel 12.x
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ There are multiple ways to customize query/data/logic. Check [Customization](#cu
## Requirements
| PHP | Laravel | Package |
|--------|---------|---------|
| 8.3+ | 13.x | v6.0.0 |
| 8.3+ | 12.x | v5.0.0 |
| 8.2+ | 11.x | v4.0.0 |
| 8.0+ | 10.x | v3.0.0 |
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"description": "Ajax support of DataTables for Laravel",
"require": {
"php": "^8.0",
"illuminate/support": "^9.33.0|^10.0|^11.0|^12.0"
"illuminate/support": "^9.33.0|^10.0|^11.0|^12.0|^13.0"
},
"require-dev": {
"orchestra/testbench": "^7.9|^8.0|^9.0|^10.0",
"phpunit/phpunit": "^9.3.9|^10.0|^11.0",
"laravel/legacy-factories": "^1.3.0"
"orchestra/testbench": "^7.9|^8.0|^9.0|^10.0|^11.0",
"phpunit/phpunit": "^9.3.9|^10.0|^11.0|^12.5.12",
"laravel/legacy-factories": "^1.3.0|dev-master"
},
"license": "MIT",
"authors": [
Expand Down
24 changes: 16 additions & 8 deletions tests/ColumnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

class ColumnTest extends TestCase
{
/** @test */
public function it_returns_the_custom_column_value()
/**
* @test
*/
public function test_it_returns_the_custom_column_value()
{
$users = $this->createUsers();

Expand All @@ -24,8 +26,10 @@ public function it_returns_the_custom_column_value()
]);
}

/** @test */
public function it_returns_the_customized_column_value()
/**
* @test
*/
public function test_it_returns_the_customized_column_value()
{
$users = $this->createUsers();

Expand All @@ -42,8 +46,10 @@ public function it_returns_the_customized_column_value()
]);
}

/** @test */
public function it_loads_additional_columns()
/**
* @test
*/
public function test_it_loads_additional_columns()
{
$users = $this->createUsers();

Expand All @@ -60,8 +66,10 @@ public function it_loads_additional_columns()
]);
}

/** @test */
public function it_converts_carbon_to_dates()
/**
* @test
*/
public function test_it_converts_carbon_to_dates()
{
$users = $this->createUsers();

Expand Down
30 changes: 20 additions & 10 deletions tests/DataFetchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

class DataFetchTest extends TestCase
{
/** @test */
public function it_returns_the_simple_data_as_expected()
/**
* @test
*/
public function test_it_returns_the_simple_data_as_expected()
{
$users = $this->createUsers();

Expand All @@ -21,8 +23,10 @@ public function it_returns_the_simple_data_as_expected()
]);
}

/** @test */
public function it_applies_the_closure_condition_with_records_of_call()
/**
* @test
*/
public function test_it_applies_the_closure_condition_with_records_of_call()
{
$users = $this->createUsers(2);

Expand All @@ -38,8 +42,10 @@ public function it_applies_the_closure_condition_with_records_of_call()
]);
}

/** @test */
public function it_uses_the_separate_class_specified_with_records_of_call()
/**
* @test
*/
public function test_it_uses_the_separate_class_specified_with_records_of_call()
{
$users = $this->createUsers();

Expand All @@ -56,8 +62,10 @@ public function it_uses_the_separate_class_specified_with_records_of_call()
]);
}

/** @test */
public function it_applies_the_custom_query_conditions()
/**
* @test
*/
public function test_it_applies_the_custom_query_conditions()
{
$users = $this->createUsers(2);

Expand All @@ -73,8 +81,10 @@ public function it_applies_the_custom_query_conditions()
]);
}

/** @test */
public function it_works_on_the_collection_after_fetching_data()
/**
* @test
*/
public function test_it_works_on_the_collection_after_fetching_data()
{
$users = $this->createUsers();

Expand Down
6 changes: 4 additions & 2 deletions tests/DataTableAttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

class DataTableAttributesTest extends TestCase
{
/** @test */
public function it_returns_the_simple_data_as_expected()
/**
* @test
*/
public function test_it_returns_the_simple_data_as_expected()
{
$users = $this->createUsers();

Expand Down
24 changes: 16 additions & 8 deletions tests/OrderingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

class OrderingTest extends TestCase
{
/** @test */
public function it_orders_the_records_as_expected()
/**
* @test
*/
public function test_it_orders_the_records_as_expected()
{
$user1 = $this->createUsers(
$count = 1,
Expand Down Expand Up @@ -42,8 +44,10 @@ public function it_orders_the_records_as_expected()
]);
}

/** @test */
public function it_orders_the_records_as_per_custom_ordering()
/**
* @test
*/
public function test_it_orders_the_records_as_per_custom_ordering()
{
$user1 = $this->createUsers(
$count = 1,
Expand Down Expand Up @@ -92,8 +96,10 @@ public function it_orders_the_records_as_per_custom_ordering()
]);
}

/** @test */
public function it_orders_the_records_with_order_by_raw()
/**
* @test
*/
public function test_it_orders_the_records_with_order_by_raw()
{
$user1 = $this->createUsers(
$count = 1,
Expand Down Expand Up @@ -144,8 +150,10 @@ public function it_orders_the_records_with_order_by_raw()
]);
}

/** @test */
public function it_orders_the_records_by_multi_column_order()
/**
* @test
*/
public function test_it_orders_the_records_by_multi_column_order()
{
$user1 = $this->createUsers(
$count = 1,
Expand Down
24 changes: 16 additions & 8 deletions tests/RecordsLimitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

class RecordsLimitTest extends TestCase
{
/** @test */
public function it_can_limit_records_to_maximum_as_per_the_configuration()
/**
* @test
*/
public function test_it_can_limit_records_to_maximum_as_per_the_configuration()
{
$users = $this->createUsers(2);

Expand All @@ -18,8 +20,10 @@ public function it_can_limit_records_to_maximum_as_per_the_configuration()
$response->assertJsonCount(1, 'data');
}

/** @test */
public function it_can_allow_unlimited_records_as_per_the_configuration()
/**
* @test
*/
public function test_it_can_allow_unlimited_records_as_per_the_configuration()
{
$users = $this->createUsers(50);

Expand All @@ -32,8 +36,10 @@ public function it_can_allow_unlimited_records_as_per_the_configuration()
$response->assertJsonCount(50, 'data');
}

/** @test */
public function it_can_limit_records_based_on_the_request_even_when_unlimited_records_are_allowed()
/**
* @test
*/
public function test_it_can_limit_records_based_on_the_request_even_when_unlimited_records_are_allowed()
{
$users = $this->createUsers(50);

Expand All @@ -46,8 +52,10 @@ public function it_can_limit_records_based_on_the_request_even_when_unlimited_re
$response->assertJsonCount(20, 'data');
}

/** @test */
public function it_prioritizes_request_limit_compared_to_configuration_limit()
/**
* @test
*/
public function test_it_prioritizes_request_limit_compared_to_configuration_limit()
{
$users = $this->createUsers(50);

Expand Down
12 changes: 8 additions & 4 deletions tests/RelationshipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

class RelationshipTest extends TestCase
{
/** @test */
public function it_returns_the_relationship_column_value()
/**
* @test
*/
public function test_it_returns_the_relationship_column_value()
{
$users = $this->createUsers();

Expand All @@ -23,8 +25,10 @@ public function it_returns_the_relationship_column_value()
]);
}

/** @test */
public function it_uses_the_custom_relationship_query()
/**
* @test
*/
public function test_it_uses_the_custom_relationship_query()
{
$users = $this->createUsers();

Expand Down
18 changes: 12 additions & 6 deletions tests/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

class SearchTest extends TestCase
{
/** @test */
public function it_applies_the_search_as_per_the_custom_method()
/**
* @test
*/
public function test_it_applies_the_search_as_per_the_custom_method()
{
$randomString = Str::random(20);

Expand Down Expand Up @@ -36,8 +38,10 @@ public function it_applies_the_search_as_per_the_custom_method()
]);
}

/** @test */
public function it_applies_the_search_to_searchable_columns()
/**
* @test
*/
public function test_it_applies_the_search_to_searchable_columns()
{
$randomString = Str::random(20);

Expand Down Expand Up @@ -65,8 +69,10 @@ public function it_applies_the_search_to_searchable_columns()
]);
}

/** @test */
public function it_skips_non_searchable_columns_during_the_search()
/**
* @test
*/
public function test_it_skips_non_searchable_columns_during_the_search()
{
$users = $this->createUsers();

Expand Down
Loading