diff --git a/docs/datatable/configurable-areas.md b/docs/datatable/configurable-areas.md index bb9d78a5b..4661be63b 100644 --- a/docs/datatable/configurable-areas.md +++ b/docs/datatable/configurable-areas.md @@ -26,6 +26,7 @@ You can use the `setConfigurableAreas` method to set multiple areas that you wan public function configure(): void { $this->setConfigurableAreas([ + 'before-wrapper' => 'path.to.my.view', 'before-tools' => 'path.to.my.view', 'toolbar-left-start' => 'path.to.my.view', 'toolbar-left-end' => 'path.to.my.view', @@ -35,6 +36,7 @@ public function configure(): void 'after-toolbar' => 'path.to.my.view', 'before-pagination' => 'path.to.my.view', 'after-pagination' => 'path.to.my.view', + 'after-wrapper' => 'path.to.my.view', ]); } ``` diff --git a/resources/views/datatable.blade.php b/resources/views/datatable.blade.php index f534f7f49..e92119d9b 100644 --- a/resources/views/datatable.blade.php +++ b/resources/views/datatable.blade.php @@ -7,15 +7,24 @@ @php($isBootstrap5 = $this->isBootstrap5)
getTopLevelAttributes() }}> + + @includeWhen( + $this->hasConfigurableAreaFor('before-wrapper'), + $this->getConfigurableAreaFor('before-wrapper'), + $this->getParametersForConfigurableArea('before-wrapper') + ) + @if($this->hasActions && !$this->showActionsInToolbar) @endif - @if ($this->hasConfigurableAreaFor('before-tools')) - @include($this->getConfigurableAreaFor('before-tools'), $this->getParametersForConfigurableArea('before-tools')) - @endif + @includeWhen( + $this->hasConfigurableAreaFor('before-tools'), + $this->getConfigurableAreaFor('before-tools'), + $this->getParametersForConfigurableArea('before-tools') + ) @if($this->shouldShowTools) @@ -26,11 +35,21 @@ @endif - @includeWhen($this->hasConfigurableAreaFor('before-toolbar'), $this->getConfigurableAreaFor('before-toolbar'), $this->getParametersForConfigurableArea('before-toolbar')) + @includeWhen( + $this->hasConfigurableAreaFor('before-toolbar'), + $this->getConfigurableAreaFor('before-toolbar'), + $this->getParametersForConfigurableArea('before-toolbar') + ) + @if($this->shouldShowToolBar) @endif - @includeWhen($this->hasConfigurableAreaFor('after-toolbar'), $this->getConfigurableAreaFor('after-toolbar'), $this->getParametersForConfigurableArea('after-toolbar')) + + @includeWhen( + $this->hasConfigurableAreaFor('after-toolbar'), + $this->getConfigurableAreaFor('after-toolbar'), + $this->getParametersForConfigurableArea('after-toolbar') + ) @endif @@ -110,4 +129,11 @@ @includeIf($customView) + + @includeWhen( + $this->hasConfigurableAreaFor('after-wrapper'), + $this->getConfigurableAreaFor('after-wrapper'), + $this->getParametersForConfigurableArea('after-wrapper') + ) +