@@ -86,6 +86,9 @@ |
||
86 | 86 | $this->registerAliasIfNotExists('Redirect', \Illuminate\Support\Facades\Redirect::class); |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param string $alias |
|
91 | + */ |
|
89 | 92 | private function registerAliasIfNotExists($alias, $class) |
90 | 93 | { |
91 | 94 | if (! array_key_exists($alias, AliasLoader::getInstance()->getAliases())) { |
@@ -15,13 +15,13 @@ discard block |
||
15 | 15 | { |
16 | 16 | parent::boot(); |
17 | 17 | |
18 | - $this->loadViewsFrom(__DIR__ . '/../../views', 'form-builder'); |
|
19 | - $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'form-builder'); |
|
18 | + $this->loadViewsFrom(__DIR__.'/../../views', 'form-builder'); |
|
19 | + $this->loadTranslationsFrom(__DIR__.'/../../lang', 'form-builder'); |
|
20 | 20 | |
21 | - $this->publishes([__DIR__ . '/../../config/config.php' => config_path('form-builder.php')]); |
|
22 | - $this->publishes([__DIR__ . '/../../views' => base_path('resources/views/vendor/form-builder')], 'views'); |
|
21 | + $this->publishes([__DIR__.'/../../config/config.php' => config_path('form-builder.php')]); |
|
22 | + $this->publishes([__DIR__.'/../../views' => base_path('resources/views/vendor/form-builder')], 'views'); |
|
23 | 23 | |
24 | - $this->mergeConfigFrom(__DIR__ . '/../../config/config.php', 'form-builder'); |
|
24 | + $this->mergeConfigFrom(__DIR__.'/../../config/config.php', 'form-builder'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function register() |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | $this->registerHtmlIfNeeded(); |
32 | 32 | $this->registerFormIfHeeded(); |
33 | 33 | |
34 | - $this->mergeConfigFrom(__DIR__ . '/../../config/config.php', 'laravel-form-builder'); |
|
34 | + $this->mergeConfigFrom(__DIR__.'/../../config/config.php', 'laravel-form-builder'); |
|
35 | 35 | |
36 | 36 | $this->registerFormHelper(); |
37 | 37 | |
38 | - $this->app->singleton('laravel-form-builder', function ($app) { |
|
38 | + $this->app->singleton('laravel-form-builder', function($app) { |
|
39 | 39 | return new FormBuilder($app, $app['laravel-form-helper']); |
40 | 40 | }); |
41 | 41 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | protected function registerFormHelper() |
48 | 48 | { |
49 | - $this->app->singleton('laravel-form-helper', function ($app) { |
|
49 | + $this->app->singleton('laravel-form-helper', function($app) { |
|
50 | 50 | $config = $app['config']->get('form-builder'); |
51 | 51 | return new FormHelper($app['view'], $app['request'], $config); |
52 | 52 | }); |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | |
57 | 57 | private function registerHtmlIfNeeded() |
58 | 58 | { |
59 | - if (! $this->app->offsetExists('html')) { |
|
60 | - $this->app->singleton('html', function ($app) { |
|
59 | + if (!$this->app->offsetExists('html')) { |
|
60 | + $this->app->singleton('html', function($app) { |
|
61 | 61 | return new LaravelHtml($app['url'], $app['view']); |
62 | 62 | }); |
63 | 63 | |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | |
68 | 68 | private function registerFormIfHeeded() |
69 | 69 | { |
70 | - if (! $this->app->offsetExists('form')) { |
|
71 | - $this->app->singleton('form', function ($app) { |
|
70 | + if (!$this->app->offsetExists('form')) { |
|
71 | + $this->app->singleton('form', function($app) { |
|
72 | 72 | $form = new LaravelForm($app['html'], $app['url'], $app['view'], $app['session.store']->getToken()); |
73 | 73 | return $form->setSessionStore($app['session.store']); |
74 | 74 | }); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | private function registerAliasIfNotExists($alias, $class) |
90 | 90 | { |
91 | - if (! array_key_exists($alias, AliasLoader::getInstance()->getAliases())) { |
|
91 | + if (!array_key_exists($alias, AliasLoader::getInstance()->getAliases())) { |
|
92 | 92 | AliasLoader::getInstance()->alias($alias, $class); |
93 | 93 | } |
94 | 94 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | @if (isset($noEdit) and $noEdit === true) |
16 | 16 | <?php |
17 | 17 | $options['default_value'] = []; |
18 | - if (! empty($options['default_value'])) { |
|
18 | + if (!empty($options['default_value'])) { |
|
19 | 19 | $options['default_value'] = is_string($options['default_value']) ? explode(',', $options['default_value']) : $options['default_value']; |
20 | 20 | } |
21 | 21 | ?> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | <span class="label label-info">{!! $tag !!} </span> |
24 | 24 | @endforeach |
25 | 25 | @else |
26 | - <?php $options['class'] = isset($options['class']) ? $options['class'] . ' tags ' : ' tags '; ?> |
|
26 | + <?php $options['class'] = isset($options['class']) ? $options['class'].' tags ' : ' tags '; ?> |
|
27 | 27 | {!! Form::input($type, $name, $options['default_value'], $options['attr']) !!} |
28 | 28 | @endif |
29 | 29 | @endif |