@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | if (config('twill.enabled.media-library')) { |
| 149 | - $this->app->singleton('imageService', function () { |
|
| 149 | + $this->app->singleton('imageService', function() { |
|
| 150 | 150 | return $this->app->make(config('twill.media_library.image_service')); |
| 151 | 151 | }); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | if (config('twill.enabled.file-library')) { |
| 155 | - $this->app->singleton('fileService', function () { |
|
| 155 | + $this->app->singleton('fileService', function() { |
|
| 156 | 156 | return $this->app->make(config('twill.file_library.file_service')); |
| 157 | 157 | }); |
| 158 | 158 | } |
@@ -359,10 +359,10 @@ discard block |
||
| 359 | 359 | |
| 360 | 360 | $attributes = join(' ', $attributes); |
| 361 | 361 | |
| 362 | - return '<?php $data = '.var_export($parsedContent[1], true).'; ?>' . |
|
| 362 | + return '<?php $data = ' . var_export($parsedContent[1], true) . '; ?>' . |
|
| 363 | 363 | '<?php $data["form"] = $form; ?>' . |
| 364 | - '<?php $name = "'.$name.'"; ?>' . |
|
| 365 | - '<?php $attributes = \''.$attributes.'\'; ?>' . |
|
| 364 | + '<?php $name = "' . $name . '"; ?>' . |
|
| 365 | + '<?php $attributes = \'' . $attributes . '\'; ?>' . |
|
| 366 | 366 | '<?php echo Blade::render("<x-twill-$name $attributes />", $data); ?>'; |
| 367 | 367 | } |
| 368 | 368 | |
@@ -387,20 +387,20 @@ discard block |
||
| 387 | 387 | { |
| 388 | 388 | $blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler(); |
| 389 | 389 | |
| 390 | - $blade->directive('dd', function ($param) { |
|
| 390 | + $blade->directive('dd', function($param) { |
|
| 391 | 391 | return "<?php dd({$param}); ?>"; |
| 392 | 392 | }); |
| 393 | 393 | |
| 394 | - $blade->directive('dumpData', function ($data) { |
|
| 394 | + $blade->directive('dumpData', function($data) { |
|
| 395 | 395 | return sprintf("<?php (new Symfony\Component\VarDumper\VarDumper)->dump(%s); exit; ?>", |
| 396 | 396 | null != $data ? $data : "get_defined_vars()"); |
| 397 | 397 | }); |
| 398 | 398 | |
| 399 | - $blade->directive('formField', function ($expression) { |
|
| 399 | + $blade->directive('formField', function($expression) { |
|
| 400 | 400 | return $this->includeView('partials.form._', $expression); |
| 401 | 401 | }); |
| 402 | 402 | |
| 403 | - $blade->directive('partialView', function ($expression) { |
|
| 403 | + $blade->directive('partialView', function($expression) { |
|
| 404 | 404 | $expressionAsArray = str_getcsv($expression, ',', '\''); |
| 405 | 405 | |
| 406 | 406 | [$moduleName, $viewName] = $expressionAsArray; |
@@ -435,13 +435,13 @@ discard block |
||
| 435 | 435 | ?>"; |
| 436 | 436 | }); |
| 437 | 437 | |
| 438 | - $blade->directive('pushonce', function ($expression) { |
|
| 438 | + $blade->directive('pushonce', function($expression) { |
|
| 439 | 439 | [$pushName, $pushSub] = explode(':', trim(substr($expression, 1, -1))); |
| 440 | 440 | $key = '__pushonce_' . $pushName . '_' . str_replace('-', '_', $pushSub); |
| 441 | 441 | return "<?php if(! isset(\$__env->{$key})): \$__env->{$key} = 1; \$__env->startPush('{$pushName}'); ?>"; |
| 442 | 442 | }); |
| 443 | 443 | |
| 444 | - $blade->directive('endpushonce', function () { |
|
| 444 | + $blade->directive('endpushonce', function() { |
|
| 445 | 445 | return '<?php $__env->stopPush(); endif; ?>'; |
| 446 | 446 | }); |
| 447 | 447 | |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | |
| 482 | 482 | View::composer('twill::partials.navigation.*', ActiveNavigation::class); |
| 483 | 483 | |
| 484 | - View::composer(['admin.*', 'templates.*', 'twill::*'], function ($view) { |
|
| 484 | + View::composer(['admin.*', 'templates.*', 'twill::*'], function($view) { |
|
| 485 | 485 | $with = array_merge([ |
| 486 | 486 | 'renderForBlocks' => false, |
| 487 | 487 | 'renderForModal' => false, |