Anvil
Anvil - The mobile companion for Laravel Forge. Available now. Download for iOS

Loading Placeholder

When running complex filters or searches, or displaying larger number of records, you can make use of the built-in Loading Placeholder, this is disabled by default.

setLoadingPlaceholderStatus

You may pass a boolean to this, which will either enable (true) or disable (false) the loading placeholder

1public function configure(): void
2{
3 $this->setLoadingPlaceholderStatus(true);
4}

setLoadingPlaceholderEnabled

Use this method to enable the loading placeholder:

1public function configure(): void
2{
3 $this->setLoadingPlaceholderEnabled();
4}

setLoadingPlaceholderDisabled

Use this method to disable the loading placeholder:

1public function configure(): void
2{
3 $this->setLoadingPlaceholderDisabled();
4}

setLoadingPlaceholderContent

You may use this method to set custom text for the placeholder:

1public function configure(): void
2{
3 $this->setLoadingPlaceholderContent('Text To Display');
4}

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.

1public function configure(): void
2{
3 $this->setLoadingPlaceHolderWrapperAttributes([
4 'class' => 'text-bold',
5 'default' => false,
6 ]);
7}

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.

1public function configure(): void
2{
3 $this->setLoadingPlaceHolderRowAttributes([
4 'class' => 'text-bold',
5 'default' => false,
6 ]);
7}

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.

1public function configure(): void
2{
3 $this->setLoadingPlaceHolderIconAttributes([
4 'class' => 'lds-hourglass',
5 'default' => false,
6 ]);
7}