@@ -24,11 +24,11 @@ |
||
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | 26 | Schema::create('languages', function (Blueprint $table) { |
| 27 | - $table->engine = 'InnoDB'; |
|
| 27 | + $table->engine = 'InnoDB'; |
|
| 28 | 28 | $table->string('code')->unique(); |
| 29 | 29 | $table->primary('code'); |
| 30 | 30 | |
| 31 | - $table->integer('position')->nullable(); |
|
| 31 | + $table->integer('position')->nullable(); |
|
| 32 | 32 | $table->string('name', 50); |
| 33 | 33 | |
| 34 | 34 | $table->timestamps(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | public function up() |
| 16 | 16 | { |
| 17 | - Schema::create('countries', function (Blueprint $table) { |
|
| 17 | + Schema::create('countries', function(Blueprint $table) { |
|
| 18 | 18 | $table->string('code')->unique(); |
| 19 | 19 | $table->primary('code'); |
| 20 | 20 | $table->string('name'); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $table->softDeletes(); |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | - Schema::create('languages', function (Blueprint $table) { |
|
| 26 | + Schema::create('languages', function(Blueprint $table) { |
|
| 27 | 27 | $table->engine = 'InnoDB'; |
| 28 | 28 | $table->string('code')->unique(); |
| 29 | 29 | $table->primary('code'); |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | $table->softDeletes(); |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - Schema::create('locales', function (Blueprint $table) { |
|
| 38 | + Schema::create('locales', function(Blueprint $table) { |
|
| 39 | 39 | $table->string('language')->unique(); |
| 40 | 40 | $table->string('country')->nullable(); |
| 41 | 41 | |
| 42 | - $table->primary(['language','country']); |
|
| 42 | + $table->primary(['language', 'country']); |
|
| 43 | 43 | |
| 44 | 44 | $table->foreign('language')->references('code')->on('languages'); |
| 45 | 45 | $table->foreign('country')->references('code')->on('countries'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | }); |
| 50 | 50 | |
| 51 | 51 | |
| 52 | - Schema::create('translations', function (Blueprint $table) { |
|
| 52 | + Schema::create('translations', function(Blueprint $table) { |
|
| 53 | 53 | $table->increments('id'); |
| 54 | 54 | $table->string('locale', 10); |
| 55 | 55 | $table->string('namespace')->default('*'); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | |
| 87 | - Schema::create(config('app.db-prefix', '').'locations', function (Blueprint $table) { |
|
| 87 | + Schema::create(config('app.db-prefix', '').'locations', function(Blueprint $table) { |
|
| 88 | 88 | $table->increments('id'); |
| 89 | 89 | }); |
| 90 | 90 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $langs = config('translation.countries'); |
| 99 | 99 | if (!empty($langs)) { |
| 100 | 100 | $class = config('translation.models.country'); |
| 101 | - foreach($langs as $code=>$name) { |
|
| 101 | + foreach ($langs as $code=>$name) { |
|
| 102 | 102 | $language = new $class; |
| 103 | 103 | $language->name = $name; |
| 104 | 104 | $language->code = $code; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $langs = config('translation.locales'); |
| 113 | 113 | if (!empty($langs)) { |
| 114 | 114 | $class = config('translation.models.language'); |
| 115 | - foreach($langs as $code=>$name) { |
|
| 115 | + foreach ($langs as $code=>$name) { |
|
| 116 | 116 | $language = new $class; |
| 117 | 117 | $language->name = $name; |
| 118 | 118 | $language->code = $code; |