스키마 빌더에서 컬럼 주석 사용하기

Submitted by river - 등록 8 years ago - 수정 8 years ago

스키마 작성시 comment 메서드를 사용하면 컬럼에 주석을 달 수 있다.

public function up()
{
  Schema::create('posts', function(Blueprint $table) {
    $table->increments('id')->comment('Unique identifier');
    $table->string('title', 128)->comment('Title of the post');
    $table->text('body')->comment('The entire content of the post');
    $table->timestamps();
  });
}
comments powered by Disqus