Created
February 8, 2017 17:08
-
-
Save abdullahseba/4da528bbdef40e919a7dde61ea3083bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
use Illuminate\Database\Schema\Blueprint; | |
/** | |
* Comments Column | |
*/ | |
if (!$schema->hasColumn('users', 'comments')) { | |
$schema->table('users', function(Blueprint $table) | |
{ | |
$table->string('comments'); | |
}); | |
echo "Created column 'comments'..." . PHP_EOL; | |
} else { | |
echo "Column 'comments' already exists. Skipping..." . PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment