Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save prondubuisi/a17ca5d4ee2f404b3b66bfb02b47fab6 to your computer and use it in GitHub Desktop.
Save prondubuisi/a17ca5d4ee2f404b3b66bfb02b47fab6 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('products', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->timestamps();
$table->string('title');
$table->string('description');
$table->integer('price');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('products');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment