Skip to content

Instantly share code, notes, and snippets.

@mikehins
Created April 21, 2017 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikehins/60d3eab6113e6f61b62cd4c09e6d3f1c to your computer and use it in GitHub Desktop.
Save mikehins/60d3eab6113e6f61b62cd4c09e6d3f1c to your computer and use it in GitHub Desktop.
create_translations_table
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTranslationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('translations', function (Blueprint $table) {
$table->string('key');
$table->text('value');
$table->integer('translatable_id');
$table->string('translatable_type');
$table->string('locale');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('translations');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment