結構建構器支援多種類型的索引。首先,讓我們看看一個指定欄位的值必須是唯一的例子。要建立索引,我們可以簡單的在欄位定義之後鏈結上 unique 方法:
unique
$table->string('email')->unique();
此外,你可以在定義完欄位之後建立索引。例如:
$table->unique('email');
[Fixed] some windows chrome, scrolling has glitch position not accurate Smooth Scrolling Flag 📜 Chrome has an experimental "smooth ...
沒有留言:
發佈留言