本文整理匯總了PHP中Illuminate\Support\Facades\Schema::getFacadeRoot方法的典型用法代碼示例。如果您正苦於以下問題:PHP Schema::getFacadeRoot方法的具體用法?PHP Schema::getFacadeRoot怎麽用?PHP Schema::getFacadeRoot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Support\Facades\Schema
的用法示例。
在下文中一共展示了Schema::getFacadeRoot方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: down
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$builder = Schema::getFacadeRoot();
(new \App\Model\SimpleDB())->downTable($builder);
(new \App\Model\Eloquent())->downTable($builder);
(new \App\Model\TaggableEloquent())->downTable($builder);
(new \App\Model\TaggableDB())->downTable($builder);
}
示例2: getDefaultSchema
/**
* Get a default schema value, if any is available
*
* @return Builder|null A default schema value or Null if no default value is available
*/
public function getDefaultSchema()
{
// By default, the schema facade depends upon a
// database connection being available. Therefore,
// we need to ensure that this is true, before
// attempting to return the facade-root
$manager = DB::getFacadeRoot();
if (!is_null($manager) && !is_null($manager->connection())) {
return Schema::getFacadeRoot();
}
return $manager;
}
示例3: down
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$builder = Schema::getFacadeRoot();
(new \App\Model\UserTable())->downTable($builder);
}