Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created August 10, 2021 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursosdesarrolloweb/937f35f27bcfc71610c82f52d2e1c407 to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/937f35f27bcfc71610c82f52d2e1c407 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 AddBannedAtColumnToUsersTable extends Migration
{
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->timestamp('banned_at')->nullable();
});
}
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('banned_at');
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment