Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"name": "hansschouten/laravel-pagebuilder",
"description": "A drag and drop pagebuilder to manage pages in any Laravel project.",
"keywords": [
"laravel",
"pagebuilder"
],
"homepage": "https://github.com/HansSchouten/Laravel-Pagebuilder",
"license": "MIT",
"authors": [
{
"name": "Hans Schouten",
"email": "hans@falcosolutions.nl"
}
],
"require": {
"php": ">=7.0",
"hansschouten/phpagebuilder": "^0.26"
},
"autoload": {
"psr-4": {
"HansSchouten\\LaravelPageBuilder\\": "src/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"laravel": {
"providers": [
"HansSchouten\\LaravelPageBuilder\\ServiceProvider"
],
"aliases": {
"PageBuilder": "HansSchouten\\LaravelPageBuilder\\Facade"
}
}
}
"name": "hansschouten/laravel-pagebuilder",
"description": "A drag and drop pagebuilder to manage pages in any Laravel project.",
"keywords": [
"laravel",
"pagebuilder"
],
"homepage": "https://github.com/HansSchouten/Laravel-Pagebuilder",
"license": "MIT",
"authors": [
{
"name": "Hans Schouten",
"email": "hans@falcosolutions.nl"
}
],
"require": {
"php": ">=7.0",
"hansschouten/phpagebuilder": "^0.27"
},
"autoload": {
"psr-4": {
"HansSchouten\\LaravelPageBuilder\\": "src/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"laravel": {
"providers": [
"HansSchouten\\LaravelPageBuilder\\ServiceProvider"
],
"aliases": {
"PageBuilder": "HansSchouten\\LaravelPageBuilder\\Facade"
}
}
}
}
12 changes: 6 additions & 6 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ public function boot()
{
$this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
$this->loadMigrationsFrom(__DIR__ . '/../migrations');

if (Schema::hasTable(config('pagebuilder.storage.database.prefix').'settings')) {
$this->publishes([
__DIR__ . '/../config/pagebuilder.php' => config_path('pagebuilder.php'),
], 'config');

if (Schema::hasTable(config('pagebuilder.storage.database.prefix') . 'settings')) {
if ($this->app->runningInConsole()) {
$this->commands([
CreateTheme::class,
Expand All @@ -43,14 +46,11 @@ public function boot()
}

// register singleton phpPageBuilder (this ensures phpb_ helpers have the right config without first manually creating a PHPageBuilder instance)
$this->app->singleton('phpPageBuilder', function($app) {
$this->app->singleton('phpPageBuilder', function ($app) {
return new PHPageBuilder(config('pagebuilder') ?? []);
});
$this->app->make('phpPageBuilder');

$this->publishes([
__DIR__ . '/../config/pagebuilder.php' => config_path('pagebuilder.php'),
], 'config');
$this->publishes([
__DIR__ . '/../themes/demo' => base_path(config('pagebuilder.theme.folder_url') . '/demo'),
], 'demo-theme');
Expand Down