diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index 356103132..c533df969 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -26,7 +26,7 @@ jobs: - name: Fix PHP code style issues uses: aglipanci/laravel-pint-action@latest - - name: Commit changes + - name: Commit styling changes uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling diff --git a/.github/workflows/run-phpstan-pull.yml b/.github/workflows/run-phpstan-pull.yml new file mode 100644 index 000000000..9f8b7a5d7 --- /dev/null +++ b/.github/workflows/run-phpstan-pull.yml @@ -0,0 +1,89 @@ +name: run-phpstan-pull + +on: + pull_request: + branches: + - 'master' + - 'development' + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + php: [8.3] + laravel: [11] + stability: [prefer-dist] + + name: PHPStan - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + env: + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup cache environment + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + key: ${{ env.extensionKey }} + + - name: Cache extensions + uses: actions/cache@v4 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ steps.extcache.outputs.key }} + restore-keys: ${{ steps.extcache.outputs.key }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + coverage: pcov + tools: phpunit:9.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup problem matchers for PHP + run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + + - name: Get composer cache directory + id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + + - name: Add token + run: | + composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update + + - name: Update dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer update --${{ matrix.stability }} --no-interaction + + - name: Install PHPStan + run: composer require larastan/larastan:^2.0 --no-interaction + + - uses: actions/cache@v4 + with: + path: ./build/phpstan + key: phpstan-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} + + - name: Run PHPStan Tests + run: ./vendor/bin/phpstan analyse \ No newline at end of file diff --git a/.github/workflows/run-phpstan.yml b/.github/workflows/run-phpstan.yml index 3701660df..742eb28a7 100644 --- a/.github/workflows/run-phpstan.yml +++ b/.github/workflows/run-phpstan.yml @@ -1,10 +1,6 @@ name: run-phpstan on: - pull_request: - branches: - - 'master' - - 'development' push: branches: - '*' # matches every branch that doesn't contain a '/' @@ -26,7 +22,7 @@ jobs: name: PHPStan - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} env: - extensionKey: phpextensions + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo steps: @@ -69,8 +65,8 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-PHPStan-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-PHPStan-P${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token run: | @@ -87,5 +83,10 @@ jobs: - name: Install PHPStan run: composer require larastan/larastan:^2.0 --dev --no-interaction + - uses: actions/cache@v4 + with: + path: ./build/phpstan + key: phpstan-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} + - name: Run PHPStan Tests - run: ./vendor/bin/phpstan analyse + run: ./vendor/bin/phpstan analyse \ No newline at end of file diff --git a/.github/workflows/run-tests-pcov-pull.yml b/.github/workflows/run-tests-pcov-pull.yml index fffe0618f..785b3c173 100644 --- a/.github/workflows/run-tests-pcov-pull.yml +++ b/.github/workflows/run-tests-pcov-pull.yml @@ -26,6 +26,14 @@ jobs: extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pcov,pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo steps: + - name: Wait for tests to finish + uses: lewagon/wait-on-check-action@v1.3.4 + with: + ref: ${{ github.ref }} + running-workflow-name: 'Run Tests Pull' + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 20 + - name: Checkout code uses: actions/checkout@v4 @@ -66,8 +74,8 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-PCOV-PULL-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-PCOV-PULL-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token run: | @@ -85,7 +93,7 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --cache-directory=".phpunit.cache/code-coverage" --strict-coverage --coverage-clover ./coverage.xml + run: php ./vendor/bin/phpunit --cache-directory=".phpunit.cache/code-coverage" --strict-coverage --coverage-clover ./coverage.xml - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 diff --git a/.github/workflows/run-tests-pull.yml b/.github/workflows/run-tests-pull.yml index 80c625554..8b0fdd2c4 100644 --- a/.github/workflows/run-tests-pull.yml +++ b/.github/workflows/run-tests-pull.yml @@ -1,4 +1,4 @@ -name: run-tests-pull +name: Run Tests Pull on: pull_request: @@ -20,8 +20,8 @@ jobs: name: PULL PHP-${{ matrix.php }} - Laravel-10 env: - extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr steps: - name: Checkout code @@ -39,8 +39,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -64,8 +64,8 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token run: | @@ -100,7 +100,7 @@ jobs: name: PULL PHP-${{ matrix.php }} - Laravel-11 env: extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr steps: - name: Checkout code @@ -118,8 +118,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -143,8 +143,8 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token run: | @@ -162,4 +162,4 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --no-coverage + run: php ./vendor/bin/phpunit --no-coverage diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bcb0d7031..8078c1ddb 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,4 +1,4 @@ -name: run-tests +name: Run Standard Tests on: push: @@ -22,8 +22,8 @@ jobs: name: PHP-${{ matrix.php }} - Laravel-10 env: - extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr steps: - name: Checkout code @@ -41,8 +41,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -66,8 +66,8 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token run: | @@ -101,8 +101,8 @@ jobs: name: PHP-${{ matrix.php }} - Laravel-11 env: - extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr steps: - name: Checkout code @@ -120,8 +120,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -145,8 +145,8 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token run: | @@ -164,4 +164,4 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --no-coverage + run: php ./vendor/bin/phpunit --no-coverage diff --git a/CHANGELOG.md b/CHANGELOG.md index 553622c32..02c0cab4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to `laravel-livewire-tables` will be documented in this file +## [v3.5.0] - 2024-11-06 + +### Bug Fixes +- Issue in multiple places where there is incorrect brackets in conjunction with coalescing operator (??) by @mrl22 in https://github.com/rappasoft/laravel-livewire-tables/pull/2021 +- Add Value to BooleanColumn custom view by @lrjoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2010 +- Add config option to bypass setting User on Events. by @me-julian in https://github.com/rappasoft/laravel-livewire-tables/pull/2006 +- Livewire column doesn't have title() method by @ChrisThompsonTLDR in https://github.com/rappasoft/laravel-livewire-tables/pull/2002 +- Loading Placeholder Adjustments by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1987 + +### New Features +- Add Sort in QueryString by @lrjoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2018 +- Add Search in QueryString by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2017 +- Add Filter in QueryString by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2011 +- BETA: Livewire Custom Filter (Array) by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2025 + +### Localisation +- Adds Swedish translations by @Aiiion in https://github.com/rappasoft/laravel-livewire-tables/pull/2027 +- Fix missing i18n keys for FR, IT, EN, DE by @khwadj in https://github.com/rappasoft/laravel-livewire-tables/pull/1993 +- Add lang Norwegian and Albanian by @channor in https://github.com/rappasoft/laravel-livewire-tables/pull/1988 + + + ## [v3.4.22] - 2024-09-29 ### Bug Fixes - Fix Loading Placeholder Bug - Breaking Table by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1969 diff --git a/config/livewire-tables.php b/config/livewire-tables.php index 4cc3dccab..7c2e20983 100644 --- a/config/livewire-tables.php +++ b/config/livewire-tables.php @@ -114,4 +114,14 @@ 'defaultConfig' => [], ], + /** + * Configuration options for Events + */ + 'events' => [ + /** + * Enable or disable passing the user from Laravel's Auth service to events + */ + 'enableUserForEvent' => true, + ], + ]; diff --git a/docs/column-types/livewire_component_column.md b/docs/column-types/livewire_component_column.md index 9b1851299..6a6af2eea 100644 --- a/docs/column-types/livewire_component_column.md +++ b/docs/column-types/livewire_component_column.md @@ -10,7 +10,6 @@ This is **not recommended** as due to the nature of Livewire, it becomes ineffic ## component ``` LivewireComponentColumn::make('Action') - ->title(fn($row) => 'Edit') ->component('PathToLivewireComponent'), ``` @@ -29,4 +28,4 @@ Please also see the following for other available methods:
  • Footer
  • - \ No newline at end of file + diff --git a/docs/datatable/available-methods.md b/docs/datatable/available-methods.md index 13d4091b3..3cf5c303c 100644 --- a/docs/datatable/available-methods.md +++ b/docs/datatable/available-methods.md @@ -76,43 +76,7 @@ public function configure(): void ## Query String -The query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: - -### setQueryStringStatus - -Enable/disable the query string. - -```php -public function configure(): void -{ - $this->setQueryStringStatus(true); - $this->setQueryStringStatus(false); -} -``` - -### setQueryStringEnabled - -Enable the query string. - -```php -public function configure(): void -{ - // Shorthand for $this->setQueryStringStatus(true) - $this->setQueryStringEnabled(); -} -``` - -### setQueryStringDisabled - -Disable the query string. - -```php -public function configure(): void -{ - // Shorthand for $this->setQueryStringStatus(false) - $this->setQueryStringDisabled(); -} -``` +The documentation for Query String now lives: [here](./query-string) ## Relationships diff --git a/docs/datatable/events.md b/docs/datatable/events.md index 2a64763a7..dc81a5695 100644 --- a/docs/datatable/events.md +++ b/docs/datatable/events.md @@ -55,6 +55,8 @@ There are several events, all in the Rappasoft\LaravelLivewireTables\Events name | FilterApplied | Applied when a Filter is applied (not when removed) | The Table Name ($tableName), Filter Key ($key), Filter Value ($value), Logged In User ($user) | | SearchApplied | Applied when a Search is applied (not when removed) | The Table Name ($tableName), Search Term ($value), Logged In User ($user) | +Passing the user with an event is optional and [can be disabled in the config](../start/configuration.md#bypassing-laravels-auth-service). + By default, the Tables will dispatch an event when the Selected Columns is changed, you may customise this behaviour: #### enableAllEvents diff --git a/docs/datatable/query-string.md b/docs/datatable/query-string.md new file mode 100644 index 000000000..c830ef15a --- /dev/null +++ b/docs/datatable/query-string.md @@ -0,0 +1,207 @@ +--- +title: Query String +weight: 5 +--- + +The query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +## Global +### setQueryStringStatus + +Enable/disable the query string. + +```php +public function configure(): void +{ + $this->setQueryStringStatus(true); + $this->setQueryStringStatus(false); +} +``` + +### setQueryStringEnabled + +Enable the query string. + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatus(true) + $this->setQueryStringEnabled(); +} +``` + +### setQueryStringDisabled + +Disable the query string. + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatus(false) + $this->setQueryStringDisabled(); +} +``` + +### setQueryStringAlias + +Change the Alias in the URL, otherwise defaults to "$tablename" + +```php +public function configure(): void +{ + $this->setQueryStringAlias('table1'); +} +``` + +## Filters + +The filter query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +### setQueryStringStatusForFilter + +Enable/disable the query string for the filters + +```php +public function configure(): void +{ + $this->setQueryStringStatusForFilter(true); + $this->setQueryStringStatusForFilter(false); +} +``` + +### setQueryStringForFilterEnabled + +Enable the query string for the filters + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForFilter(true) + $this->setQueryStringForFilterEnabled(); +} +``` + +### setQueryStringForFilterDisabled + +Disable the query string for the filters + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForFilter(false) + $this->setQueryStringForFilterDisabled(); +} +``` + +### setQueryStringAliasForFilter + +Change the Alias in the URL for the filter, otherwise defaults to "$tablename-filters" + +```php +public function configure(): void +{ + $this->setQueryStringAliasForFilter('filtervalues'); +} +``` + +## Search + +The search query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +### setQueryStringStatusForSearch + +Enable/disable the query string for search + +```php +public function configure(): void +{ + $this->setQueryStringStatusForSearch(true); + $this->setQueryStringStatusForSearch(false); +} +``` + +### setQueryStringForSearchEnabled + +Enable the query string for search + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSearch(true) + $this->setQueryStringForSearchEnabled(); +} +``` + +### setQueryStringForSearchDisabled + +Disable the query string for search + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSearch(false) + $this->setQueryStringForSearchDisabled(); +} +``` + +### setQueryStringAliasForSearch + +Change the Alias in the URL for the search, otherwise defaults to "$tablename-search" + +```php +public function configure(): void +{ + $this->setQueryStringAliasForSearch('search'); +} +``` + +## Sorts + +The sorts query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +### setQueryStringStatusForSort + +Enable/disable the query string for sort + +```php +public function configure(): void +{ + $this->setQueryStringStatusForSort(true); + $this->setQueryStringStatusForSort(false); +} +``` + +### setQueryStringForSortEnabled + +Enable the query string for sort + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSort(true) + $this->setQueryStringForSortEnabled(); +} +``` + +### setQueryStringForSortDisabled + +Disable the query string for sort + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSort(false) + $this->setQueryStringForSortDisabled(); +} +``` + +### setQueryStringAliasForSort + +Change the Alias in the URL for the sorts, otherwise defaults to "$tablename-sorts" + +```php +public function configure(): void +{ + $this->setQueryStringAliasForSort('sorts'); +} +``` \ No newline at end of file diff --git a/docs/datatable/styling.md b/docs/datatable/styling.md index 9353ad00e..937a6df94 100644 --- a/docs/datatable/styling.md +++ b/docs/datatable/styling.md @@ -1,6 +1,6 @@ --- title: Styling -weight: 5 +weight: 6 --- The package offers significant opportunities to customise the look & feel of the core table, as well as other elements (which are documented in the relevant sections). diff --git a/docs/misc/loading-placeholder.md b/docs/misc/loading-placeholder.md index 20ca7f9b5..67c4977ac 100644 --- a/docs/misc/loading-placeholder.md +++ b/docs/misc/loading-placeholder.md @@ -47,7 +47,9 @@ You may use this method to set custom text for the placeholder: $this->setLoadingPlaceholderContent('Text To Display'); } ``` -### setLoadingPlaceHolderWrapperAttributes +### setLoadingPlaceHolderWrapperAttributes (Deprecated) + +This is replaced by setLoadingPlaceHolderRowAttributes, but remains functional. This method allows you to customise the attributes for the <tr> element used as a Placeholder when the table is loading. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes. @@ -62,6 +64,22 @@ This method allows you to customise the attributes for the <tr> element us ``` +### setLoadingPlaceHolderRowAttributes + +Replaces setLoadingPlaceHolderWrapperAttributes +This method allows you to customise the attributes for the <tr> element used as a Placeholder when the table is loading. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes. + +```php + public function configure(): void + { + $this->setLoadingPlaceHolderRowAttributes([ + 'class' => 'text-bold', + 'default' => false, + ]); + } + +``` + ### setLoadingPlaceHolderIconAttributes This method allows you to customise the attributes for the <div> element that is used solely for the PlaceholderIcon. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes. diff --git a/docs/start/configuration.md b/docs/start/configuration.md index 3e264c578..01725843f 100644 --- a/docs/start/configuration.md +++ b/docs/start/configuration.md @@ -81,3 +81,22 @@ You must also make sure you have this Alpine style available globally. Note that [x-cloak] { display: none !important; } ``` + +## Bypassing Laravel's Auth Service + +By default, all [events](../datatable/events#dispatched) will retrieve any currently authenticated user from Laravel's [Auth service](https://laravel.com/docs/authentication) and pass it along with the event. + +If your project doesn't include the Illuminate/Auth package, or you otherwise want to prevent this, you can set the `enableUserForEvent` config option to false. + +```php +// config/livewire-tables.php +return [ + // ... + 'events' => [ + /** + * Enable or disable passing the user from Laravel's Auth service to events + */ + 'enableUserForEvent' => false, + ], +]; +``` diff --git a/resources/lang/de.json b/resources/lang/de.json index 2ddfa94cc..6ef76e8bf 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -5,6 +5,7 @@ "livewire-tables::Applied Sorting": "Angewendete Sortierung", "livewire-tables::Bulk Actions": "Aktionen", "livewire-tables::Clear": "Zurücksetzen", + "livewire-tables::Bulk Actions Confirm": "Bist du sicher?", "livewire-tables::Columns": "Spalten", "livewire-tables::Debugging Values": "Werte debuggen", "livewire-tables::Deselect All": "Alle abwählen", @@ -23,6 +24,7 @@ "livewire-tables::rows, do you want to select all": "Zeilen, sollen alle ausgewählt werden", "livewire-tables::Search": "Suche", "livewire-tables::Select All": "Alle auswählen", + "livewire-tables::Select All On Page": "Alle auf der Seite auswählen", "livewire-tables::Showing": "Anzeigen", "livewire-tables::to": "nach", "livewire-tables::Yes": "Ja", @@ -34,6 +36,7 @@ "Applied Filters": "Angewendete Filter", "Applied Sorting": "Angewendete Sortierung", "Bulk Actions": "Aktionen", + "Bulk Actions Confirm": "Bist du sicher?", "Clear": "Zurücksetzen", "Columns": "Spalten", "Debugging Values": "Werte debuggen", @@ -53,6 +56,7 @@ "rows, do you want to select all": "Zeilen, sollen alle ausgewählt werden", "Search": "Suche", "Select All": "Alle auswählen", + "Select All On Page": "Alle auf der Seite auswählen", "Showing": "Anzeigen", "to": "nach", "Yes": "Ja", diff --git a/resources/lang/en.json b/resources/lang/en.json index dcf30f145..1579cbbe2 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -11,6 +11,7 @@ "livewire-tables::Deselect All": "Deselect All", "livewire-tables::Done Reordering": "Done Reordering", "livewire-tables::Filters": "Filters", + "livewire-tables::loading": "Loading", "livewire-tables::max": "Max", "livewire-tables::min": "Min", "livewire-tables::not_applicable": "N/A", @@ -45,6 +46,7 @@ "Deselect All": "Deselect All", "Done Reordering": "Done Reordering", "Filters": "Filters", + "loading": "Loading", "max": "Max", "min": "Min", "not_applicable": "N/A", diff --git a/resources/lang/es.json b/resources/lang/es.json index b03b2e25f..8654e82ca 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -4,6 +4,7 @@ "livewire-tables::Applied Filters": "Filtros Aplicados", "livewire-tables::Applied Sorting": "Ordenamiento Aplicado", "livewire-tables::Bulk Actions": "Acciones Masivas", + "livewire-tables::Bulk Actions Confirm": "Está seguro?", "livewire-tables::Clear": "Borrar", "livewire-tables::Columns": "Columnas", "livewire-tables::Debugging Values": "Valores de depuración", @@ -35,6 +36,7 @@ "Applied Filters": "Filtros Aplicados", "Applied Sorting": "Ordenamiento Aplicado", "Bulk Actions": "Acciones Masivas", + "Bulk Actions Confirm": "Está seguro?", "Clear": "Borrar", "Columns": "Columnas", "Debugging Values": "Valores de depuración", diff --git a/resources/lang/fr.json b/resources/lang/fr.json index 89323dc4a..9cb399d08 100644 --- a/resources/lang/fr.json +++ b/resources/lang/fr.json @@ -4,6 +4,7 @@ "livewire-tables::Applied Filters": "Filtres appliqués", "livewire-tables::Applied Sorting": "Tris appliqués", "livewire-tables::Bulk Actions": "Actions en masse", + "livewire-tables::Bulk Actions Confirm": "Êtes-vous sûr ?", "livewire-tables::Clear": "Effacer", "livewire-tables::Columns": "Colonnes", "livewire-tables::Debugging Values": "Valeurs de débogage", @@ -23,7 +24,8 @@ "livewire-tables::rows, do you want to select all": "lignes, voulez-vous tout sélectionner ?", "livewire-tables::Search": "Rechercher", "livewire-tables::Select All": "Tout sélectionner", - "livewire-tables::Showing": "Montrant", + "livewire-tables::Select All On Page": "Tout sélectionner sur la page", + "livewire-tables::Showing": "Résultats", "livewire-tables::to": "à", "livewire-tables::Yes": "Oui", "livewire-tables::You are currently selecting all": "Vous êtes en train de sélectionner ", @@ -34,6 +36,7 @@ "Applied Filters": "Filtres appliqués", "Applied Sorting": "Tris appliqués", "Bulk Actions": "Actions en masse", + "Bulk Actions Confirm": "Êtes-vous sûr ?", "Clear": "Effacer", "Columns": "Colonnes", "Debugging Values": "Valeurs de débogage", @@ -53,7 +56,8 @@ "rows, do you want to select all": "lignes, voulez-vous tout sélectionner ?", "Search": "Rechercher", "Select All": "Tout sélectionner", - "Showing": "Montrant", + "Select All On Page": "Tout sélectionner sur la page", + "Showing": "Résultats", "to": "à", "Yes": "Oui", "You are currently selecting all": "Vous êtes en train de sélectionner ", diff --git a/resources/lang/it.json b/resources/lang/it.json index a1c50fb21..ceaffa5fc 100644 --- a/resources/lang/it.json +++ b/resources/lang/it.json @@ -4,6 +4,7 @@ "livewire-tables::Applied Filters": "Filtri Applicati", "livewire-tables::Applied Sorting": "Ordinamento Applicato", "livewire-tables::Bulk Actions": "Azioni di Gruppo", + "livewire-tables::Bulk Actions Confirm": "Sei sicuro?", "livewire-tables::Clear": "Pulisci", "livewire-tables::Columns": "Colonne", "livewire-tables::Debugging Values": "Valori di debug", @@ -22,7 +23,8 @@ "livewire-tables::rows": "righe", "livewire-tables::rows, do you want to select all": "righe, vuoi selezionarle tutte", "livewire-tables::Search": "Cerca", - "livewire-tables::Select All": "Seleziona Tutto", + "livewire-tables::Select All": "Seleziona tutto", + "livewire-tables::Select All On Page": "Seleziona tutto sulla pagina", "livewire-tables::Showing": "Visualizzati", "livewire-tables::to": "a", "livewire-tables::Yes": "SÌ", @@ -34,6 +36,7 @@ "Applied Filters": "Filtri Applicati", "Applied Sorting": "Ordinamento Applicato", "Bulk Actions": "Azioni di Gruppo", + "Bulk Actions Confirm": "Sei sicuro?", "Clear": "Pulisci", "Columns": "Colonne", "Debugging Values": "Valori di debug", @@ -52,7 +55,8 @@ "rows": "righe", "rows, do you want to select all": "righe, vuoi selezionarle tutte", "Search": "Cerca", - "Select All": "Seleziona Tutto", + "Select All": "Seleziona tutto", + "Select All On Page": "Seleziona tutto sulla pagina", "Showing": "Visualizzati", "to": "a", "Yes": "SÌ", diff --git a/resources/lang/nb.json b/resources/lang/nb.json new file mode 100644 index 000000000..b7bb83929 --- /dev/null +++ b/resources/lang/nb.json @@ -0,0 +1,70 @@ +{ + "livewire-tables::All": "Alle", + "livewire-tables::All Columns": "Alle kolonner", + "livewire-tables::Applied Filters": "Anvendte filtre", + "livewire-tables::Applied Sorting": "Anvendt sortering", + "livewire-tables::Bulk Actions": "Massehandlinger", + "livewire-tables::Bulk Actions Confirm": "Er du sikker?", + "livewire-tables::Clear": "Tøm", + "livewire-tables::Columns": "Kolonner", + "livewire-tables::Debugging Values": "Debugger Verdier", + "livewire-tables::Deselect All": "Opphev alle", + "livewire-tables::Done Reordering": "Ferdig med omorganisering", + "livewire-tables::Filters": "Filtre", + "livewire-tables::max": "Maks", + "livewire-tables::min": "Min", + "livewire-tables::not_applicable": "I/T", + "livewire-tables::No": "Nei", + "livewire-tables::No items found. Try to broaden your search.": "Ingen elementer funnet. Prøv å utvide søket.", + "livewire-tables::of": "av", + "livewire-tables::Remove filter option": "Fjern filtervalg", + "livewire-tables::Remove sort option": "Fjern sorteringsvalg", + "livewire-tables::Reorder": "Omorganiser", + "livewire-tables::results": "resultater", + "livewire-tables::row": "rad", + "livewire-tables::rows": "rader", + "livewire-tables::rows, do you want to select all": "rader, vil du velge alle", + "livewire-tables::Search": "Søk", + "livewire-tables::Select All": "Velg alle", + "livewire-tables::Select All On Page": "Velg alle på siden", + "livewire-tables::Showing": "Viser", + "livewire-tables::to": "til", + "livewire-tables::Yes": "Ja", + "livewire-tables::You are currently selecting all": "Du velger for øyeblikket alle", + "livewire-tables::You are not connected to the internet.": "Du er ikke tilkoblet internett.", + "livewire-tables::You have selected": "Du har valgt", + "All": "Alle", + "All Columns": "Alle kolonner", + "Applied Filters": "Anvendte filtre", + "Applied Sorting": "Anvendt sortering", + "Bulk Actions": "Massehandlinger", + "Bulk Actions Confirm": "Er du sikker?", + "Clear": "Tøm", + "Columns": "Kolonner", + "Debugging Values": "Debugger verdier", + "Deselect All": "Opphev valg for alle", + "Done Reordering": "Ferdig med omorganisering", + "Filters": "Filtre", + "max": "Maks", + "min": "Min", + "not_applicable": "I/T", + "No": "Nei", + "No items found. Try to broaden your search.": "Ingen elementer funnet. Prøv å utvide søket.", + "of": "av", + "Remove filter option": "Fjern filtervalg", + "Remove sort option": "Fjern sorteringsvalg", + "Reorder": "Omorganiser", + "results": "resultater", + "row": "rad", + "rows": "rader", + "rows, do you want to select all": "rader, vil du velge alle", + "Search": "Søk", + "Select All": "Velg alle", + "Select All On Page": "Velg alle på siden", + "Showing": "Viser", + "to": "til", + "Yes": "Ja", + "You are currently selecting all": "Du velger for øyeblikket alle", + "You are not connected to the internet.": "Du er ikke tilkoblet internett.", + "You have selected": "Du har valgt" +} diff --git a/resources/lang/sq.json b/resources/lang/sq.json new file mode 100644 index 000000000..1784fa2cc --- /dev/null +++ b/resources/lang/sq.json @@ -0,0 +1,70 @@ +{ + "livewire-tables::All": "Të gjitha", + "livewire-tables::All Columns": "Të gjitha kolonat", + "livewire-tables::Applied Filters": "Filtrat e aplikuara", + "livewire-tables::Applied Sorting": "Renditja e aplikuar", + "livewire-tables::Bulk Actions": "Veprime në masë", + "livewire-tables::Bulk Actions Confirm": "A jeni i sigurt?", + "livewire-tables::Clear": "Pastro", + "livewire-tables::Columns": "Kolonat", + "livewire-tables::Debugging Values": "Vlerat e korrigjimit", + "livewire-tables::Deselect All": "Heq të gjitha", + "livewire-tables::Done Reordering": "Përfundoi riorganizimi", + "livewire-tables::Filters": "Filtrat", + "livewire-tables::max": "Maksimumi", + "livewire-tables::min": "Minimumi", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Jo", + "livewire-tables::No items found. Try to broaden your search.": "Nuk u gjetën artikuj. Provoni të zgjeroni kërkimin tuaj.", + "livewire-tables::of": "nga", + "livewire-tables::Remove filter option": "Hiq opsionin e filtrit", + "livewire-tables::Remove sort option": "Hiq opsionin e renditjes", + "livewire-tables::Reorder": "Riorganizo", + "livewire-tables::results": "rezultate", + "livewire-tables::row": "rreshti", + "livewire-tables::rows": "rreshtat", + "livewire-tables::rows, do you want to select all": "rreshtat, dëshironi të zgjidhni të gjitha", + "livewire-tables::Search": "Kërko", + "livewire-tables::Select All": "Zgjidh të gjitha", + "livewire-tables::Select All On Page": "Zgjidh të gjitha në faqe", + "livewire-tables::Showing": "Duke treguar", + "livewire-tables::to": "te", + "livewire-tables::Yes": "Po", + "livewire-tables::You are currently selecting all": "Po zgjedhni të gjitha aktualisht", + "livewire-tables::You are not connected to the internet.": "Nuk jeni të lidhur me internetin.", + "livewire-tables::You have selected": "Keni zgjedhur", + "All": "Të gjitha", + "All Columns": "Të gjitha kolonat", + "Applied Filters": "Filtrat e aplikuara", + "Applied Sorting": "Renditja e aplikuar", + "Bulk Actions": "Veprime në masë", + "Bulk Actions Confirm": "A jeni i sigurt?", + "Clear": "Pastro", + "Columns": "Kolonat", + "Debugging Values": "Vlerat e korrigjimit", + "Deselect All": "Heq të gjitha", + "Done Reordering": "Përfundoi riorganizimi", + "Filters": "Filtrat", + "max": "Maksimumi", + "min": "Minimumi", + "not_applicable": "N/A", + "No": "Jo", + "No items found. Try to broaden your search.": "Nuk u gjetën artikuj. Provoni të zgjeroni kërkimin tuaj.", + "of": "nga", + "Remove filter option": "Hiq opsionin e filtrit", + "Remove sort option": "Hiq opsionin e renditjes", + "Reorder": "Riorganizo", + "results": "rezultate", + "row": "rreshti", + "rows": "rreshtat", + "rows, do you want to select all": "rreshtat, dëshironi të zgjidhni të gjitha", + "Search": "Kërko", + "Select All": "Zgjidh të gjitha", + "Select All On Page": "Zgjidh të gjitha në faqe", + "Showing": "Duke treguar", + "to": "te", + "Yes": "Po", + "You are currently selecting all": "Po zgjedhni të gjitha aktualisht", + "You are not connected to the internet.": "Nuk jeni të lidhur me internetin.", + "You have selected": "Keni zgjedhur" +} diff --git a/resources/lang/sv.json b/resources/lang/sv.json new file mode 100644 index 000000000..4bfd4cbfb --- /dev/null +++ b/resources/lang/sv.json @@ -0,0 +1,36 @@ +{ + "livewire-tables::All": "Alla", + "livewire-tables::All Columns": "Alla Columner", + "livewire-tables::Applied Filters": "Valda filter", + "livewire-tables::Applied Sorting": "Vald sortering", + "livewire-tables::Bulk Actions": "Bulk Modifiering", + "livewire-tables::Bulk Actions Confirm": "Är du säker?", + "livewire-tables::Clear": "Rensa", + "livewire-tables::Columns": "Columner", + "livewire-tables::Debugging Values": "Debug Värden", + "livewire-tables::Deselect All": "Avmarkera alla", + "livewire-tables::Done Reordering": "Omordning klart", + "livewire-tables::Filters": "Filter", + "livewire-tables::max": "Max", + "livewire-tables::min": "Min", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Nej", + "livewire-tables::No items found. Try to broaden your search.": "Inga föremål hittades. Försök vidga din sökning.", + "livewire-tables::of": "av", + "livewire-tables::Remove filter option": "Rensa valt filter", + "livewire-tables::Remove sort option": "Rensa vald sortering", + "livewire-tables::Reorder": "Omordna", + "livewire-tables::results": "resultat", + "livewire-tables::row": "rad", + "livewire-tables::rows": "rader", + "livewire-tables::rows, do you want to select all": "rader, vill du markera alla", + "livewire-tables::Search": "Sök", + "livewire-tables::Select All": "Markera alla", + "livewire-tables::Select All On Page": "Markera alla på sidan", + "livewire-tables::Showing": "Visar", + "livewire-tables::to": "till", + "livewire-tables::Yes": "Ja", + "livewire-tables::You are currently selecting all": "Du markerar för närvarande alla", + "livewire-tables::You are not connected to the internet.": "Du är inte uppkopplad till internet.", + "livewire-tables::You have selected": "Du har markerat" +} diff --git a/resources/views/components/includes/loading.blade.php b/resources/views/components/includes/loading.blade.php index f22096321..b8c988e88 100644 --- a/resources/views/components/includes/loading.blade.php +++ b/resources/views/components/includes/loading.blade.php @@ -1,35 +1,37 @@ -@aware(['isTailwind', 'isBootstrap', 'tableName', 'component']) +@aware(['tableName']) @props(['colCount' => 1]) @php -$customAttributes['loader-wrapper'] = $this->getLoadingPlaceHolderWrapperAttributes(); -$customAttributes['loader-icon'] = $this->getLoadingPlaceHolderIconAttributes(); +$loaderRow = $this->getLoadingPlaceHolderRowAttributes(); +$loaderCell = $this->getLoadingPlaceHolderCellAttributes(); +$loaderIcon = $this->getLoadingPlaceHolderIconAttributes(); @endphp -@if($this->hasLoadingPlaceholderBlade()) - @include($this->getLoadingPlaceHolderBlade(), ['colCount' => $colCount]) -@else - merge($customAttributes['loader-wrapper']) - ->class(['hidden w-full text-center h-screen place-items-center align-middle' => $isTailwind && ($customAttributes['loader-wrapper']['default'] ?? true)]) - ->class(['d-none w-100 text-center h-100 align-items-center' => $isBootstrap && ($customAttributes['loader-wrapper']['default'] ?? true)]); - }} - wire:loading.class.remove="hidden d-none" - > - +merge($loaderRow) + ->class(['hidden w-full text-center place-items-center align-middle' => $this->isTailwind && ($loaderRow['default'] ?? true)]) + ->class(['d-none w-100 text-center align-items-center' => $this->isBootstrap && ($loaderRow['default'] ?? true)]) + ->except(['default','default-styling','default-colors']) +}}> + merge($loaderCell) + ->class(['py-4' => $this->isTailwind && ($loaderCell['default'] ?? true)]) + ->class(['py-4' => $this->isBootstrap && ($loaderCell['default'] ?? true)]) + ->except(['default','default-styling','default-colors', 'colspan','wire:key']) + }}> + @if($this->hasLoadingPlaceholderBlade()) + @include($this->getLoadingPlaceHolderBlade(), ['colCount' => $colCount]) + @else
    -
    merge($customAttributes['loader-icon']) - ->class(['lds-hourglass' => $isTailwind && ($customAttributes['loader-icon']['default'] ?? true)]) - ->class(['lds-hourglass' => $isBootstrap && ($customAttributes['loader-icon']['default'] ?? true)]) +
    merge($loaderIcon) + ->class(['lds-hourglass' => $this->isTailwind && ($loaderIcon['default'] ?? true)]) + ->class(['lds-hourglass' => $this->isBootstrap && ($loaderIcon['default'] ?? true)]) ->except(['default','default-styling','default-colors']); - }} - >
    -
    {{ $this->getLoadingPlaceholderContent() }}
    + }}>
    +
    {!! $this->getLoadingPlaceholderContent() !!}
    - - + @endif + + -@endif diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index b12366dc7..3afee536c 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -20,8 +20,8 @@ @if ($isTailwind) merge($customThAttributes) - ->class(['text-gray-500 dark:bg-gray-800 dark:text-gray-400' => ($customThAttributes['default-colors'] ?? true || $customThAttributes['default'] ?? true)]) - ->class(['px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => ($customThAttributes['default-styling'] ?? true || $customThAttributes['default'] ?? true)]) + ->class(['text-gray-500 dark:bg-gray-800 dark:text-gray-400' => (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true))]) + ->class(['px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true))]) ->class(['hidden' => $column->shouldCollapseAlways()]) ->class(['hidden md:table-cell' => $column->shouldCollapseOnMobile()]) ->class(['hidden lg:table-cell' => $column->shouldCollapseOnTablet()]) @@ -35,8 +35,8 @@