}
],
"require": {
- "php": ">=5.4.0"
+ "php": ">=5.4.0",
+ "laravel/framework": "5.8.x-dev"
},
"repositories": [
{
"url": "https:\/\/composer.cubedesigners.com\/"
}
]
-}
\ No newline at end of file
+}
+++ /dev/null
-<?php
-
-namespace Cubist\Front;
-class SayHello
-{
- public static function world()
- {
- return 'Hello World, Composer!';
- }
-}
\ No newline at end of file
--- /dev/null
+<?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