Created
October 5, 2017 15:13
-
-
Save dclarke-modus/a66646c9152714d8c911b1fa00fc7878 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Class CustomMigration extends Migration | |
{ | |
protected function createAuditTables ($table) | |
{ | |
$table->timestamp('auditCreated_at')->useCurrent = true; | |
$table->timestamp('auditUpdated_at')->useCurrent = true; | |
} | |
} | |
class 2017_08_12_BlahTable extends CustomMigration | |
{ | |
public function up() | |
{ | |
var $me = $this; | |
Schema::create('Blah', function (Blueprint $table) use ($me) { | |
$table->increments('id'); | |
$table->int('custom_column'); | |
$me->createAuditTables($table); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment