Commit a5d67aba by Angel MAS

publish assets in resources

parent 2681c8fb
...@@ -15,6 +15,23 @@ class BlogServiceProvider extends ServiceProvider ...@@ -15,6 +15,23 @@ class BlogServiceProvider extends ServiceProvider
{ {
include __DIR__.'/routes.php'; include __DIR__.'/routes.php';
$this->loadMigrationsFrom(__DIR__.'/migrations'); $this->loadMigrationsFrom(__DIR__.'/migrations');
if (is_dir(base_path() . '/resources/views/vendor/onestartup/blog')) {
$this->loadViewsFrom(base_path() . '/resources/views/vendor/onestartup/blog', 'blog');
} else {
$this->loadViewsFrom(__DIR__.'/views', 'blog');
}
$this->publishes([
__DIR__.'/views' => resource_path('views/vendor/onestartup/blog'),
]);
} }
/** /**
...@@ -28,6 +45,6 @@ class BlogServiceProvider extends ServiceProvider ...@@ -28,6 +45,6 @@ class BlogServiceProvider extends ServiceProvider
$this->app->make('Onestartup\Blog\Controller\CategoryController'); $this->app->make('Onestartup\Blog\Controller\CategoryController');
$this->app->make('Onestartup\Blog\Controller\TagCatalogController'); $this->app->make('Onestartup\Blog\Controller\TagCatalogController');
$this->app->make('Onestartup\Blog\Controller\BlogController'); $this->app->make('Onestartup\Blog\Controller\BlogController');
$this->loadViewsFrom(__DIR__.'/views', 'blog');
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment