@@ -3,7 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | {!! Form::i18nCheckbox('online', trans('block::blocks.online'), $errors, $lang) !!} |
| 5 | 5 | |
| 6 | - <?php if (config('asgard.block.config.partials.translatable.create') !== []): ?> |
|
| 6 | + <?php if (config('asgard.block.config.partials.translatable.create') !== [ ]): ?> |
|
| 7 | 7 | <?php foreach (config('asgard.block.config.partials.translatable.create') as $partial): ?> |
| 8 | 8 | @include($partial) |
| 9 | 9 | <?php endforeach; ?> |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | {!! Form::i18nCheckbox('online', trans('block::blocks.online'), $errors, $lang, $block) !!} |
| 5 | 5 | |
| 6 | - <?php if (config('asgard.block.config.partials.translatable.edit') !== []): ?> |
|
| 6 | + <?php if (config('asgard.block.config.partials.translatable.edit') !== [ ]): ?> |
|
| 7 | 7 | <?php foreach (config('asgard.block.config.partials.translatable.edit') as $partial): ?> |
| 8 | 8 | @include($partial) |
| 9 | 9 | <?php endforeach; ?> |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | @include('block::admin.blocks.partials.edit-fields', ['lang' => $locale]) |
| 30 | 30 | </div> |
| 31 | 31 | <?php endforeach; ?> |
| 32 | - <?php if (config('asgard.block.config.partials.normal.edit') !== []): ?> |
|
| 32 | + <?php if (config('asgard.block.config.partials.normal.edit') !== [ ]): ?> |
|
| 33 | 33 | <?php foreach (config('asgard.block.config.partials.normal.edit') as $partial): ?> |
| 34 | 34 | @include($partial) |
| 35 | 35 | <?php endforeach; ?> |
@@ -10,12 +10,12 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | 'partials' => [ |
| 12 | 12 | 'translatable' => [ |
| 13 | - 'create' => [], |
|
| 14 | - 'edit' => [], |
|
| 13 | + 'create' => [ ], |
|
| 14 | + 'edit' => [ ], |
|
| 15 | 15 | ], |
| 16 | 16 | 'normal' => [ |
| 17 | - 'create' => [], |
|
| 18 | - 'edit' => [], |
|
| 17 | + 'create' => [ ], |
|
| 18 | + 'edit' => [ ], |
|
| 19 | 19 | ], |
| 20 | 20 | ], |
| 21 | 21 | ]; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function boot() |
| 28 | 28 | { |
| 29 | 29 | $this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'asgard.block.config'); |
| 30 | - $this->publishes([__DIR__ . '/../Config/config.php' => config_path('asgard.block.config' . '.php'), ], 'config'); |
|
| 30 | + $this->publishes([ __DIR__ . '/../Config/config.php' => config_path('asgard.block.config' . '.php'), ], 'config'); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -43,10 +43,10 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $this->app->bind( |
| 45 | 45 | 'Modules\Block\Repositories\BlockRepository', |
| 46 | - function () { |
|
| 46 | + function() { |
|
| 47 | 47 | $repository = new EloquentBlockRepository(new Block()); |
| 48 | 48 | |
| 49 | - if (! config('app.cache')) { |
|
| 49 | + if (!config('app.cache')) { |
|
| 50 | 50 | return $repository; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | protected $presenter = 'Modules\Block\Presenters\BlockPresenter'; |
| 12 | 12 | protected $table = 'block__blocks'; |
| 13 | - public $translatedAttributes = ['online', 'body']; |
|
| 14 | - protected $fillable = ['name', 'online', 'body']; |
|
| 13 | + public $translatedAttributes = [ 'online', 'body' ]; |
|
| 14 | + protected $fillable = [ 'name', 'online', 'body' ]; |
|
| 15 | 15 | protected $casts = [ |
| 16 | 16 | 'online' => 'bool', |
| 17 | 17 | ]; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public function __call($method, $parameters) |
| 20 | 20 | { |
| 21 | 21 | #i: Convert array to dot notation |
| 22 | - $config = implode('.', ['asgard.block.config.relations', $method]); |
|
| 22 | + $config = implode('.', [ 'asgard.block.config.relations', $method ]); |
|
| 23 | 23 | |
| 24 | 24 | #i: Relation method resolver |
| 25 | 25 | if (config()->has($config)) { |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$router->bind('block', function ($id) { |
|
| 3 | +$router->bind('block', function($id) { |
|
| 4 | 4 | return app(\Modules\Block\Repositories\BlockRepository::class)->find($id); |
| 5 | 5 | }); |
| 6 | -$router->group(['prefix' => '/block'], function () { |
|
| 6 | +$router->group([ 'prefix' => '/block' ], function() { |
|
| 7 | 7 | get('blocks', [ |
| 8 | 8 | 'as' => 'admin.block.block.index', |
| 9 | 9 | 'uses' => 'BlockController@index', |