Skip to content

Instantly share code, notes, and snippets.

@Sairahcaz
Created November 24, 2023 14:42
Show Gist options
  • Save Sairahcaz/f5ca7f0536f58cf3b01cab45ffcfc8fb to your computer and use it in GitHub Desktop.
Save Sairahcaz/f5ca7f0536f58cf3b01cab45ffcfc8fb to your computer and use it in GitHub Desktop.
<?php
Schema::create('persons', function (Blueprint $table) {
$table->id();
$table->string('first_name', 100);
$table->string('last_name', 100);
$table->string('email');
$table->foreignId('address_id')->constrained();
$table->text('bio')->nullable();
$table->enum('gender', ['m', 'f', 'd']);
$table->date('birth');
$table->year('graduated');
$table->float('body_size');
$table->unsignedTinyInteger('children_count')->nullable();
$table->integer('account_balance');
$table->unsignedInteger('net_income');
$table->boolean('send_newsletter')->nullable();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment