]> _ Git - cubist_cms-front.git/commitdiff
wip #2413 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Feb 2019 18:39:04 +0000 (19:39 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Feb 2019 18:39:04 +0000 (19:39 +0100)
composer.json
src/Cubist/Front/SayHello.php [deleted file]
src/FrontServiceProvider.php [new file with mode: 0644]
src/config/cubist-front.php [new file with mode: 0644]

index 4baae91bc2fd3e23c777c10b20cf9737ae4ccc97..3b055b4a721a8bf5bebd4ce13b9654198df882c7 100644 (file)
@@ -16,7 +16,8 @@
     }
   ],
   "require": {
-    "php": ">=5.4.0"
+    "php": ">=5.4.0",
+    "laravel/framework": "5.8.x-dev"
   },
   "repositories": [
     {
@@ -24,4 +25,4 @@
       "url": "https:\/\/composer.cubedesigners.com\/"
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/src/Cubist/Front/SayHello.php b/src/Cubist/Front/SayHello.php
deleted file mode 100644 (file)
index c413e6f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-namespace Cubist\Front;
-class SayHello
-{
-    public static function world()
-    {
-        return 'Hello World, Composer!';
-    }
-}
\ No newline at end of file
diff --git a/src/FrontServiceProvider.php b/src/FrontServiceProvider.php
new file mode 100644 (file)
index 0000000..af3b53e
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace Cubist\Front;
+
+use Illuminate\Support\ServiceProvider;
+
+
+class FrontServiceProvider extends ServiceProvider
+{
+    /**
+     * Perform post-registration booting of services.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        // LOAD THE VIEWS
+        // - first the published/overwritten views (in case they have any changes)
+        $customViewsFolder = resource_path('views/vendor/cubist/front');
+
+        if (file_exists($customViewsFolder)) {
+            $this->loadViewsFrom($customViewsFolder, 'cubist');
+        }
+        // - then the stock views that come with the package, in case a published view might be missing
+        $this->loadViewsFrom(realpath(__DIR__.'/resources/views'), 'cubist');
+
+        // publish config file
+        $this->publishes([__DIR__.'/config/cubist-front.php' => config_path('cubist-front.php')], 'config');
+        // publish the views
+        $this->publishes([__DIR__.'/resources/views' => resource_path('views/vendor/backpack/backupmanager')], 'views');
+    }
+}
\ No newline at end of file
diff --git a/src/config/cubist-front.php b/src/config/cubist-front.php
new file mode 100644 (file)
index 0000000..b3d9bbc
--- /dev/null
@@ -0,0 +1 @@
+<?php