Skip to content

Instantly share code, notes, and snippets.

@earth774
Created April 27, 2019 07:13
Show Gist options
  • Save earth774/f548e9fae318b4b038740e3ba5cf8ff5 to your computer and use it in GitHub Desktop.
Save earth774/f548e9fae318b4b038740e3ba5cf8ff5 to your computer and use it in GitHub Desktop.
create table in database
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('fullname');
$table->string('lastname');
$table->string('age');
$table->string('tel');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment