@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('blocks', function (Blueprint $table) { |
|
16 | + Schema::create('blocks', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('blockable_id')->nullable()->unsigned(); |
19 | 19 | $table->string('blockable_type')->nullable(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('features', function (Blueprint $table) { |
|
16 | + Schema::create('features', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('featured_id', 36); |
19 | 19 | $table->string('featured_type', 255); |
@@ -113,7 +113,7 @@ |
||
113 | 113 | |
114 | 114 | $params = ['fp-x' => $fpX, 'fp-y' => $fpY, 'fp-z' => $fpZ]; |
115 | 115 | |
116 | - return array_map(function ($param) { |
|
116 | + return array_map(function($param) { |
|
117 | 117 | return number_format($param, 4, ".", ""); |
118 | 118 | }, $params) + ['crop' => 'focalpoint', 'fit' => 'crop']; |
119 | 119 | } |
@@ -13,11 +13,11 @@ |
||
13 | 13 | |
14 | 14 | public function renderBlocks($renderChilds = true, $blockViewMappings = [], $data = []) |
15 | 15 | { |
16 | - return $this->blocks->where('parent_id', null)->map(function ($block) use ($blockViewMappings, $renderChilds, $data) { |
|
16 | + return $this->blocks->where('parent_id', null)->map(function($block) use ($blockViewMappings, $renderChilds, $data) { |
|
17 | 17 | if ($renderChilds) { |
18 | 18 | $childBlocks = $this->blocks->where('parent_id', $block->id); |
19 | 19 | |
20 | - $renderedChildViews = $childBlocks->map(function ($childBlock) use ($blockViewMappings, $data) { |
|
20 | + $renderedChildViews = $childBlocks->map(function($childBlock) use ($blockViewMappings, $data) { |
|
21 | 21 | $view = $this->getBlockView($childBlock->type, $blockViewMappings); |
22 | 22 | return view($view, $data)->with('block', $childBlock)->render(); |
23 | 23 | })->implode(''); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | protected static function bootHasPosition() |
9 | 9 | { |
10 | - static::creating(function ($model) { |
|
10 | + static::creating(function($model) { |
|
11 | 11 | $model->setToLastPosition(); |
12 | 12 | }); |
13 | 13 | } |
@@ -32,12 +32,12 @@ |
||
32 | 32 | public function scopeVisible($query) |
33 | 33 | { |
34 | 34 | if ($this->isFillable('publish_start_date')) { |
35 | - $query->where(function ($query) { |
|
35 | + $query->where(function($query) { |
|
36 | 36 | $query->whereNull('publish_start_date')->orWhere('publish_start_date', '<=', Carbon::now()); |
37 | 37 | }); |
38 | 38 | |
39 | 39 | if ($this->isFillable('publish_end_date')) { |
40 | - $query->where(function ($query) { |
|
40 | + $query->where(function($query) { |
|
41 | 41 | $query->whereNull('publish_end_date')->orWhere('publish_end_date', '>=', Carbon::now()); |
42 | 42 | }); |
43 | 43 | } |
@@ -14,8 +14,8 @@ |
||
14 | 14 | public function rules() |
15 | 15 | { |
16 | 16 | switch ($this->method()) { |
17 | - case 'POST':{return $this->rulesForCreate();} |
|
18 | - case 'PUT':{return $this->rulesForUpdate();} |
|
17 | + case 'POST':{return $this->rulesForCreate(); } |
|
18 | + case 'PUT':{return $this->rulesForUpdate(); } |
|
19 | 19 | default:break; |
20 | 20 | } |
21 | 21 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | if (!empty($ids)) { |
48 | 48 | foreach ($ids as $id) { |
49 | - $tagQuery->whereHas('tagged', function ($query) use ($id) { |
|
49 | + $tagQuery->whereHas('tagged', function($query) use ($id) { |
|
50 | 50 | $query->where('taggable_id', $id); |
51 | 51 | }); |
52 | 52 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function getTagsList() |
59 | 59 | { |
60 | - return $this->getTagsQuery()->where('count', '>', 0)->select('name', 'id')->get()->map(function ($tag) { |
|
60 | + return $this->getTagsQuery()->where('count', '>', 0)->select('name', 'id')->get()->map(function($tag) { |
|
61 | 61 | return [ |
62 | 62 | 'label' => $tag->name, |
63 | 63 | 'value' => $tag->id, |
@@ -5,7 +5,7 @@ |
||
5 | 5 | { |
6 | 6 | if (!app()->environment('local', 'development')) { |
7 | 7 | try { |
8 | - $manifest = Cache::rememberForever('rev-manifest', function () { |
|
8 | + $manifest = Cache::rememberForever('rev-manifest', function() { |
|
9 | 9 | return json_decode(file_get_contents(config('twill.frontend.rev_manifest_path')), true); |
10 | 10 | }); |
11 | 11 |