]> _ Git - cubist_cms-back.git/commitdiff
wip #3753 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Dec 2020 13:06:20 +0000 (14:06 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Dec 2020 13:06:20 +0000 (14:06 +0100)
src/app/CubistBackpackServiceProvider.php

index 94ba457ff08b5ddf79a10a4a7a67a9958a859d50..466001d74f213a93d5f653aff5632685add41c67 100644 (file)
@@ -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'];