turkmentv/database/migrations/2019_05_16_113951_create_pa...

37 lines
882 B
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pages', function (Blueprint $table) {
$table->increments('id');
$table->string('title')->nullable();
$table->string('keywords')->nullable();
$table->text('meta_description')->nullable();
$table->longText('description')->nullable();
$table->unsignedInteger('menu_id');
$table->foreign('menu_id')->references('id')->on('menus');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pages');
}
}