@@ -21,11 +21,11 @@ |
||
21 | 21 | }); |
22 | 22 | |
23 | 23 | Schema::create('languages', function (Blueprint $table) { |
24 | - $table->engine = 'InnoDB'; |
|
24 | + $table->engine = 'InnoDB'; |
|
25 | 25 | $table->string('code')->unique(); |
26 | 26 | $table->primary('code'); |
27 | 27 | |
28 | - $table->integer('position')->nullable(); |
|
28 | + $table->integer('position')->nullable(); |
|
29 | 29 | $table->string('name', 50); |
30 | 30 | }); |
31 | 31 |
@@ -14,13 +14,13 @@ 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'); |
21 | 21 | }); |
22 | 22 | |
23 | - Schema::create('languages', function (Blueprint $table) { |
|
23 | + Schema::create('languages', function(Blueprint $table) { |
|
24 | 24 | $table->engine = 'InnoDB'; |
25 | 25 | $table->string('code')->unique(); |
26 | 26 | $table->primary('code'); |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | $table->string('name', 50); |
30 | 30 | }); |
31 | 31 | |
32 | - Schema::create('locales', function (Blueprint $table) { |
|
32 | + Schema::create('locales', function(Blueprint $table) { |
|
33 | 33 | $table->string('language')->unique(); |
34 | 34 | $table->string('country')->nullable(); |
35 | 35 | |
36 | - $table->primary(['language','country']); |
|
36 | + $table->primary(['language', 'country']); |
|
37 | 37 | |
38 | 38 | $table->foreign('language')->references('code')->on('languages'); |
39 | 39 | $table->foreign('country')->references('code')->on('countries'); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | }); |
42 | 42 | |
43 | 43 | |
44 | - Schema::create('translations', function (Blueprint $table) { |
|
44 | + Schema::create('translations', function(Blueprint $table) { |
|
45 | 45 | $table->increments('id'); |
46 | 46 | $table->string('locale', 10); |
47 | 47 | $table->string('namespace')->default('*'); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | |
78 | 78 | |
79 | - Schema::create(config('app.db-prefix', '').'locations', function (Blueprint $table) { |
|
79 | + Schema::create(config('app.db-prefix', '').'locations', function(Blueprint $table) { |
|
80 | 80 | $table->increments('id'); |
81 | 81 | }); |
82 | 82 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $langs = config('translation.countries'); |
91 | 91 | if (!empty($langs)) { |
92 | 92 | $class = config('translation.models.country'); |
93 | - foreach($langs as $code=>$name) { |
|
93 | + foreach ($langs as $code=>$name) { |
|
94 | 94 | $language = new $class; |
95 | 95 | $language->name = $name; |
96 | 96 | $language->code = $code; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $langs = config('translation.locales'); |
105 | 105 | if (!empty($langs)) { |
106 | 106 | $class = config('translation.models.language'); |
107 | - foreach($langs as $code=>$name) { |
|
107 | + foreach ($langs as $code=>$name) { |
|
108 | 108 | $language = new $class; |
109 | 109 | $language->name = $name; |
110 | 110 | $language->code = $code; |