@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create(/** @scrutinizer ignore-call */config('seo-manager.database.translates_table'), function (Blueprint $table) { |
|
16 | + Schema::create(/** @scrutinizer ignore-call */config('seo-manager.database.translates_table'), function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('route_id'); |
19 | 19 | $table->string('locale'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create(/** @scrutinizer ignore-call */config('seo-manager.database.table'), function (Blueprint $table) { |
|
16 | + Schema::create(/** @scrutinizer ignore-call */config('seo-manager.database.table'), function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('uri')->nullable(); |
19 | 19 | $table->jsonb('params')->nullable(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create(/** @scrutinizer ignore-call */config('seo-manager.database.locales_table'), function (Blueprint $table) { |
|
16 | + Schema::create(/** @scrutinizer ignore-call */config('seo-manager.database.locales_table'), function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->timestamps(); |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | 'prefix' => /** @scrutinizer ignore-call */config('seo-manager.route'), |
6 | 6 | 'as' => 'seo-manager.', |
7 | 7 | 'namespace' => 'Lionix\SeoManager' |
8 | -], function () { |
|
8 | +], function() { |
|
9 | 9 | Route::get('/', 'ManagerController@index')->name('home'); |
10 | 10 | Route::get('get-routes', 'ManagerController@getRoutes')->name('get-routes'); |
11 | 11 | Route::get('import-routes', 'ImportController')->name('import'); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | Route::post('get-model-columns', 'ManagerController@getModelColumns')->name('get-model-columns'); |
15 | 15 | Route::post('store-data', 'ManagerController@storeData')->name('store-data'); |
16 | 16 | Route::post('get-example-title', 'ManagerController@getExampleTitle')->name('get-example-title'); |
17 | - Route::group(['prefix' => 'locales', 'as' => 'locales.'], function () { |
|
17 | + Route::group(['prefix' => 'locales', 'as' => 'locales.'], function() { |
|
18 | 18 | Route::get('get-locales', 'LocalesController@getLocales')->name('get'); |
19 | 19 | Route::post('add-locale', 'LocalesController@addLocale')->name('add'); |
20 | 20 | }); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function __construct() |
20 | 20 | { |
21 | - if(Input::get('locale')){ |
|
21 | + if (Input::get('locale')) { |
|
22 | 22 | /** @scrutinizer ignore-call */ |
23 | 23 | app()->setLocale(Input::get('locale')); |
24 | 24 | $this->locale = app()->getLocale(); |
@@ -83,16 +83,16 @@ discard block |
||
83 | 83 | $seoManager = SeoManagerModel::find($id); |
84 | 84 | if (in_array($type, $allowedColumns)) { |
85 | 85 | $data = $request->get($type); |
86 | - if($type != 'mapping' && $this->locale !== /** @scrutinizer ignore-call */ config('seo-manager.locale')){ |
|
86 | + if ($type != 'mapping' && $this->locale !== /** @scrutinizer ignore-call */ config('seo-manager.locale')) { |
|
87 | 87 | $translate = $seoManager->translation()->where('locale', $this->locale)->first(); |
88 | - if(!$translate){ |
|
88 | + if (!$translate) { |
|
89 | 89 | $newInst = new Translate(); |
90 | 90 | $newInst->locale = $this->locale; |
91 | 91 | $translate = $seoManager->translation()->save($newInst); |
92 | 92 | } |
93 | 93 | $translate->$type = $data; |
94 | 94 | $translate->save(); |
95 | - }else{ |
|
95 | + } else { |
|
96 | 96 | $seoManager->$type = $data; |
97 | 97 | $seoManager->save(); |
98 | 98 | } |