@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function boot(): void |
| 11 | 11 | { |
| 12 | - $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'chief'); |
|
| 12 | + $this->loadViewsFrom(__DIR__.'/../../resources/views', 'chief'); |
|
| 13 | 13 | |
| 14 | 14 | Blade::componentNamespace('Thinktomorrow\\Chief\\App\\View\\Components', 'chief'); |
| 15 | 15 | |
@@ -28,19 +28,19 @@ discard block |
||
| 28 | 28 | Blade::component('chief::templates.mail.template', 'chief::mail.template'); |
| 29 | 29 | |
| 30 | 30 | // Chief directives |
| 31 | - Blade::directive('adminRoute', function ($expression) { |
|
| 31 | + Blade::directive('adminRoute', function($expression) { |
|
| 32 | 32 | return "<?php echo \$manager->route({$expression}); ?>"; |
| 33 | 33 | }); |
| 34 | 34 | |
| 35 | - Blade::directive('adminCan', function ($expression) { |
|
| 35 | + Blade::directive('adminCan', function($expression) { |
|
| 36 | 36 | return "<?php if (isset(\$manager) && \$manager->can({$expression})) { ?>"; |
| 37 | 37 | }); |
| 38 | 38 | |
| 39 | - Blade::directive('elseAdminCan', function () { |
|
| 39 | + Blade::directive('elseAdminCan', function() { |
|
| 40 | 40 | return '<?php } else { ?>'; |
| 41 | 41 | }); |
| 42 | 42 | |
| 43 | - Blade::directive('endAdminCan', function () { |
|
| 43 | + Blade::directive('endAdminCan', function() { |
|
| 44 | 44 | return '<?php } ?>'; |
| 45 | 45 | }); |
| 46 | 46 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | $this->bootFrontendEssentials(); |
| 81 | 81 | |
| 82 | - if (! $this->app->make(AdminEnvironment::class)->check(request())) { |
|
| 82 | + if (!$this->app->make(AdminEnvironment::class)->check(request())) { |
|
| 83 | 83 | return; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -112,36 +112,36 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | public function register() |
| 114 | 114 | { |
| 115 | - $this->mergeConfigFrom(__DIR__ . '/../../config/chief.php', 'chief'); |
|
| 116 | - $this->mergeConfigFrom(__DIR__ . '/../../config/chief-settings.php', 'chief-settings'); |
|
| 115 | + $this->mergeConfigFrom(__DIR__.'/../../config/chief.php', 'chief'); |
|
| 116 | + $this->mergeConfigFrom(__DIR__.'/../../config/chief-settings.php', 'chief-settings'); |
|
| 117 | 117 | |
| 118 | 118 | if ($this->app->runningInConsole()) { |
| 119 | 119 | (new ConsoleServiceProvider($this->app))->register(); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - $this->app->singleton(Registry::class, function () { |
|
| 122 | + $this->app->singleton(Registry::class, function() { |
|
| 123 | 123 | return new Registry([]); |
| 124 | 124 | }); |
| 125 | 125 | |
| 126 | - $this->app->singleton(Settings::class, function () { |
|
| 126 | + $this->app->singleton(Settings::class, function() { |
|
| 127 | 127 | return new Settings(); |
| 128 | 128 | }); |
| 129 | 129 | |
| 130 | 130 | (new SquantoServiceProvider($this->app))->register(); |
| 131 | 131 | |
| 132 | - $this->app->bind(SitemapXml::class, function () { |
|
| 132 | + $this->app->bind(SitemapXml::class, function() { |
|
| 133 | 133 | return new SitemapXml(new Client(['verify' => false])); |
| 134 | 134 | }); |
| 135 | 135 | |
| 136 | 136 | if ($this->app->make(AdminEnvironment::class)->check(request())) { |
| 137 | 137 | $this->app->when(SettingsController::class) |
| 138 | 138 | ->needs(SettingFields::class) |
| 139 | - ->give(function () { |
|
| 139 | + ->give(function() { |
|
| 140 | 140 | return new SettingFields(new Settings()); |
| 141 | 141 | }); |
| 142 | 142 | |
| 143 | 143 | // Global chief nav singleton |
| 144 | - $this->app->singleton(Nav::class, function () { |
|
| 144 | + $this->app->singleton(Nav::class, function() { |
|
| 145 | 145 | return new Nav(); |
| 146 | 146 | }); |
| 147 | 147 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | 'role' => \Thinktomorrow\Chief\Admin\Authorization\Role::class, |
| 176 | 176 | ]; |
| 177 | 177 | |
| 178 | - Auth::provider('chief-eloquent', function ($app, array $config) { |
|
| 178 | + Auth::provider('chief-eloquent', function($app, array $config) { |
|
| 179 | 179 | return new ChiefUserProvider($app['hash'], $config['model']); |
| 180 | 180 | }); |
| 181 | 181 | } |
@@ -183,10 +183,10 @@ discard block |
||
| 183 | 183 | private function bootChiefSquanto(): void |
| 184 | 184 | { |
| 185 | 185 | // Project specific squanto files |
| 186 | - $this->app['view']->addNamespace('squanto', __DIR__ . '/../../resources/views/vendor/squanto'); |
|
| 186 | + $this->app['view']->addNamespace('squanto', __DIR__.'/../../resources/views/vendor/squanto'); |
|
| 187 | 187 | |
| 188 | 188 | // Chief squanto defaults |
| 189 | - $this->app['view']->addNamespace('squanto', base_path() . '/resources/views/vendor/thinktomorrow/chief/vendor/squanto'); |
|
| 189 | + $this->app['view']->addNamespace('squanto', base_path().'/resources/views/vendor/thinktomorrow/chief/vendor/squanto'); |
|
| 190 | 190 | |
| 191 | 191 | // Use the chief routing |
| 192 | 192 | $this->app['config']['squanto.use_default_routes'] = false; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | // User events |
| 198 | 198 | Event::listen(Login::class, LogSuccessfulLogin::class); |
| 199 | 199 | Event::listen(UserInvited::class, SendInvite::class); |
| 200 | - Event::listen(InviteAccepted::class, EnableUser::class . '@onAcceptingInvite'); |
|
| 200 | + Event::listen(InviteAccepted::class, EnableUser::class.'@onAcceptingInvite'); |
|
| 201 | 201 | |
| 202 | 202 | // Managed model events |
| 203 | 203 | Event::listen(ManagedModelCreated::class, [CreateUrlForPage::class, 'onManagedModelCreated']); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | Relation::morphMap(['chiefuser' => User::class]); |
| 246 | 246 | Relation::morphMap(['menuitem' => MenuItem::class]); |
| 247 | 247 | |
| 248 | - Blade::directive('fragments', function () { |
|
| 248 | + Blade::directive('fragments', function() { |
|
| 249 | 249 | return '<?php echo app(\\Thinktomorrow\\Chief\\Fragments\\FragmentsRenderer::class)->render($model instanceof \Thinktomorrow\Chief\Shared\Concerns\Nestable\Tree\NestedNode ? $model->getModel() : $model, get_defined_vars()); ?>'; |
| 250 | 250 | }); |
| 251 | 251 | } |