From cfed5069efe8c844ad50d66d986e6da1d2502e11 Mon Sep 17 00:00:00 2001 From: Maxim Shuguroff <5457669+shuguroff@users.noreply.github.com> Date: Tue, 14 Nov 2023 15:33:47 +0300 Subject: [PATCH] Add view loader for view override --- src/FilamentTableRepeaterServiceProvider.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/FilamentTableRepeaterServiceProvider.php b/src/FilamentTableRepeaterServiceProvider.php index a08aae3..fbee573 100644 --- a/src/FilamentTableRepeaterServiceProvider.php +++ b/src/FilamentTableRepeaterServiceProvider.php @@ -7,6 +7,12 @@ class FilamentTableRepeaterServiceProvider extends PackageServiceProvider { + public function boot() + { + $this->bootLoaders(); + $this->bootPublishing(); + } + public function configurePackage(Package $package): void { $package->name('filament-table-repeater') @@ -14,4 +20,17 @@ public function configurePackage(Package $package): void ->hasTranslations() ->hasViews(); } + + protected function bootLoaders() + { + $this->loadViewsFrom(__DIR__ . '/../resources/views', 'filament-table-repeater'); + $this->loadTranslationsFrom(__DIR__ . '/../lang', 'filament-table-repeater'); + } + + protected function bootPublishing() + { + $this->publishes([ + __DIR__ . '/../resources/views' => resource_path('views/vendor/filament-table-repeater'), + ], 'filament-table-repeater'); + } }