Schema Builder
建立資料表
Schema::create('posts', function($table) {
$table->increments('id');
$table->string('title');
$table->string('content');
$table->timestamps();
});CREATE TABLE `posts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`content` varchar(255) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
)資料表重新命名
刪除資料表
新增欄位
刪除欄位
欄位重新命名
Last updated