@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('translations', function (Blueprint $table) { |
|
| 16 | + Schema::create('translations', function(Blueprint $table) { |
|
| 17 | 17 | $table->string('key'); |
| 18 | 18 | $table->text('value'); |
| 19 | 19 | $table->bigInteger('translatable_id')->unsigned(); |
@@ -6,34 +6,34 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CreateTranslationsTable extends Migration |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - Schema::create('translations', function (Blueprint $table) { |
|
| 17 | - $table->string('key'); |
|
| 18 | - $table->text('value'); |
|
| 19 | - $table->bigInteger('translatable_id')->unsigned(); |
|
| 20 | - $table->string('translatable_type'); |
|
| 21 | - $table->string('locale'); |
|
| 22 | - }); |
|
| 9 | + /** |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + Schema::create('translations', function (Blueprint $table) { |
|
| 17 | + $table->string('key'); |
|
| 18 | + $table->text('value'); |
|
| 19 | + $table->bigInteger('translatable_id')->unsigned(); |
|
| 20 | + $table->string('translatable_type'); |
|
| 21 | + $table->string('locale'); |
|
| 22 | + }); |
|
| 23 | 23 | |
| 24 | - // sqlite does not like this... |
|
| 25 | - if (app()->environment() !== 'testing') { |
|
| 26 | - \DB::statement('ALTER TABLE `translations` ADD FULLTEXT fulltext_index (`key`)'); |
|
| 27 | - } |
|
| 28 | - } |
|
| 24 | + // sqlite does not like this... |
|
| 25 | + if (app()->environment() !== 'testing') { |
|
| 26 | + \DB::statement('ALTER TABLE `translations` ADD FULLTEXT fulltext_index (`key`)'); |
|
| 27 | + } |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Reverse the migrations. |
|
| 32 | - * |
|
| 33 | - * @return void |
|
| 34 | - */ |
|
| 35 | - public function down() |
|
| 36 | - { |
|
| 37 | - Schema::dropIfExists('translations'); |
|
| 38 | - } |
|
| 30 | + /** |
|
| 31 | + * Reverse the migrations. |
|
| 32 | + * |
|
| 33 | + * @return void |
|
| 34 | + */ |
|
| 35 | + public function down() |
|
| 36 | + { |
|
| 37 | + Schema::dropIfExists('translations'); |
|
| 38 | + } |
|
| 39 | 39 | } |
| 40 | 40 | \ No newline at end of file |
@@ -77,5 +77,5 @@ |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | // https://arianacosta.com/php/laravel/tutorial-full-text-search-laravel-5/ |
| 80 | - // full text search |
|
| 80 | + // full text search |
|
| 81 | 81 | } |