translateable cms pages
This commit is contained in:
parent
ee8584a2d5
commit
0457e65565
8 changed files with 244 additions and 10 deletions
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePageTranslationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('page_translations', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('page_id')->unsigned();
|
||||
$table->string('locale')->index();
|
||||
|
||||
$table->string('title');
|
||||
$table->text('description');
|
||||
|
||||
$table->unique(['page_id','locale']);
|
||||
$table->foreign('page_id')->references('id')->on('pages')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('page_translations');
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue