99re热这里只有精品视频,7777色鬼xxxx欧美色妇,国产成人精品一区二三区在线观看,内射爽无广熟女亚洲,精品人妻av一区二区三区

建立與刪除數(shù)據(jù)表

2018-02-24 15:53 更新

要建立一個新的數(shù)據(jù)表,可使用 Schema::create 方法:

Schema::create('users', function($table)
{
    $table->increments('id');
});

傳入 create 方法的第一個參數(shù)是數(shù)據(jù)表名稱,第二個參數(shù)是 Closure 并接收 Blueprint 對象被用來定義新的數(shù)據(jù)表。

要修改數(shù)據(jù)表名稱,可使用 rename 方法:

Schema::rename($from, $to);

要指定特定連接來操作,可使用 Schema::connection 方法:

Schema::connection('foo')->create('users', function($table)
{
    $table->increments('id');
});

要移除數(shù)據(jù)表,可使用 Schema::drop 方法:

Schema::drop('users');
Schema::dropIfExists('users');
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號