欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

增加普通索引列 and index column 有大用

Available Index Types

Each index method accepts an optional second argument to specify the name of the index. If omitted, the name will be derived from the names of the table and column(s).

CommandDescription
$table->primary('id');Adds a primary key.
$table->primary(['id', 'parent_id']);Adds composite keys.
$table->unique('email');Adds a unique index.
$table->index('state');Adds a plain index.
$table->spatialIndex('location');Adds a spatial index. (except SQLite)

来自  https://laravel.com/docs/5.7/migrations

普通分类: