From 9ea6820bdd0d5d9cc5111530f1c8dc94062b25eb Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 3 Dec 2020 14:06:20 +0100 Subject: [PATCH] wip #3753 @0.5 --- src/app/CubistBackpackServiceProvider.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/CubistBackpackServiceProvider.php b/src/app/CubistBackpackServiceProvider.php index 94ba457..466001d 100644 --- a/src/app/CubistBackpackServiceProvider.php +++ b/src/app/CubistBackpackServiceProvider.php @@ -31,14 +31,17 @@ class CubistBackpackServiceProvider extends ServiceProvider */ public function boot() { - $resourcesDir = __DIR__ . '/../resources'; - $this->loadTranslationsFrom(realpath(__DIR__ . '/resources/lang'), self::NAMESPACE); - foreach (glob(__DIR__ . '/routes/cubist/backpack/*.php') as $filename) { + + $base = realpath(__DIR__ . "/.."); + $resourcesDir = $base . '/resources'; + + $this->loadTranslationsFrom(realpath($resourcesDir . '/lang'), self::NAMESPACE); + foreach (glob($base . '/routes/cubist/backpack/*.php') as $filename) { $this->loadRoutesFrom($filename); } $this->publishes([$resourcesDir . '/config/cubist.php' => config_path('cubist.php')], 'config'); - $this->loadViewsFrom(realpath(__DIR__ . '/resources/views'), self::NAMESPACE); + $this->loadViewsFrom(realpath($resourcesDir . '/views'), self::NAMESPACE); Blade::directive('vendor_asset', function ($path) { return vendor_asset($path); @@ -62,7 +65,9 @@ class CubistBackpackServiceProvider extends ServiceProvider */ public function register() { - $resourcesDir = __DIR__ . '/resources'; + $base = realpath(__DIR__ . "/.."); + $resourcesDir = $base . '/resources'; + $configs = ['app', 'cubist']; -- 2.39.5