Skip to content

Instantly share code, notes, and snippets.

@amitdevteams
Last active August 28, 2021 13:11
Show Gist options
  • Save amitdevteams/707ef6ff654257256c1831b1a123a4ad to your computer and use it in GitHub Desktop.
Save amitdevteams/707ef6ff654257256c1831b1a123a4ad to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('products', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email');
$table->string('phone');
$table->string('detail');
$table->timestamps();
});
}
/**
* 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