@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - if (! Schema::hasColumn('pages', 'css') ) { |
|
17 | - Schema::table('pages', function (Blueprint $table) { |
|
16 | + if (!Schema::hasColumn('pages', 'css')) { |
|
17 | + Schema::table('pages', function(Blueprint $table) { |
|
18 | 18 | $table->longText('css')->nullable()->after('meta'); |
19 | 19 | }); |
20 | 20 | } |
21 | 21 | |
22 | - if (! Schema::hasColumn('pages', 'js') ) { |
|
23 | - Schema::table('pages', function (Blueprint $table) { |
|
22 | + if (!Schema::hasColumn('pages', 'js')) { |
|
23 | + Schema::table('pages', function(Blueprint $table) { |
|
24 | 24 | $table->longText('js')->nullable()->after('css'); |
25 | 25 | }); |
26 | 26 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function down() |
35 | 35 | { |
36 | - Schema::table('pages', function (Blueprint $table) { |
|
36 | + Schema::table('pages', function(Blueprint $table) { |
|
37 | 37 | $table->dropColumn('js'); |
38 | 38 | $table->dropColumn('css'); |
39 | 39 | }); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | class PageRepository |
10 | 10 | { |
11 | - protected $page; |
|
11 | + protected $page; |
|
12 | 12 | |
13 | 13 | public function __construct(Page $page) |
14 | 14 | { |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | |
18 | 18 | public function find(string $id) |
19 | 19 | { |
20 | - return $this->page->where('id', $id)->first(); |
|
20 | + return $this->page->where('id', $id)->first(); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function create(Request $request) |
24 | 24 | { |
25 | - $page = new Page(); |
|
25 | + $page = new Page(); |
|
26 | 26 | |
27 | 27 | $meta = []; |
28 | 28 | foreach (ChuckSite::getSupportedLocales() as $langKey => $langValue) { |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | |
112 | 112 | $count = count($request->get('meta_key')[$langKey]); |
113 | 113 | for ($i = 0; $i < $count; $i++) { |
114 | - if (!is_null($request->get('meta_value')[$langKey][$i])) { |
|
115 | - $meta[$langKey][$request->get('meta_key')[$langKey][$i]] = $request->get('meta_value')[$langKey][$i]; |
|
116 | - } |
|
114 | + if (!is_null($request->get('meta_value')[$langKey][$i])) { |
|
115 | + $meta[$langKey][$request->get('meta_key')[$langKey][$i]] = $request->get('meta_value')[$langKey][$i]; |
|
116 | + } |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | $page->meta = $meta; |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | $follow = 'nofollow'; |
53 | 53 | } |
54 | 54 | |
55 | - $meta[$langKey]['robots'] = $index.$follow; |
|
56 | - $meta[$langKey]['googlebots'] = $index.$follow; |
|
55 | + $meta[$langKey]['robots'] = $index . $follow; |
|
56 | + $meta[$langKey]['googlebots'] = $index . $follow; |
|
57 | 57 | |
58 | 58 | $count = count($request->get('meta_key')[$langKey]); |
59 | 59 | for ($i = 0; $i < $count; $i++) { |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | $follow = 'nofollow'; |
107 | 107 | } |
108 | 108 | |
109 | - $meta[$langKey]['robots'] = $index.$follow; |
|
110 | - $meta[$langKey]['googlebots'] = $index.$follow; |
|
109 | + $meta[$langKey]['robots'] = $index . $follow; |
|
110 | + $meta[$langKey]['googlebots'] = $index . $follow; |
|
111 | 111 | |
112 | 112 | $count = count($request->get('meta_key')[$langKey]); |
113 | 113 | for ($i = 0; $i < $count; $i++) { |