mardi 28 mai 2019

how to redefine column in Blueprint

Background

I am trying to extend class Blueprint to make my Blueprint.Finally,I found the way .But when I made attempt to overwrite some ColumnDefinition ,some trouble stopped me.

 Schema::create('Person',function(Blueprint $table){
    $table->string('id')->comment('身份证号');
    $table->string('id')->comment('学号')->change();//this line doesn't work!
});

Like the above code,the second line in that Closure doesn't work and i don't know why.

What I know is that some 'Modify Cloumn' operations need a dependency called doctrine/dbal and I have installed it.

The function change() neither reports any error nor meets expectation.It is strange.

Please help me!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire