本文整理汇总了PHP中Illuminate\Support\Facades\DB::disableQueryLog方法的典型用法代码示例。如果您正苦于以下问题:PHP DB::disableQueryLog方法的具体用法?PHP DB::disableQueryLog怎么用?PHP DB::disableQueryLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Facades\DB
的用法示例。
在下文中一共展示了DB::disableQueryLog方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
DB::disableQueryLog();
$estados = array(array("nome" => "ACRE", "capital" => "RIO BRANCO", "uf" => "AC"), array("nome" => "ALAGOAS", "capital" => "MACEIÓ", "uf" => "AL"), array("nome" => "AMAPÁ", "capital" => "MACAPÁ", "uf" => "AP"), array("nome" => "AMAZONAS", "capital" => "MANAUS", "uf" => "AM"), array("nome" => "BAHIA", "capital" => "SALVADOR", "uf" => "BA"), array("nome" => "CEARÁ", "capital" => "FORTALEZA", "uf" => "CE"), array("nome" => "DISTRITO FEDERAL", "capital" => "BRASÍLIA", "uf" => "DF"), array("nome" => "ESPÍRITO SANTO", "capital" => "VITÓRIA", "uf" => "ES"), array("nome" => "GOIÁS", "capital" => "GOIÂNIA", "uf" => "GO"), array("nome" => "MARANHÃO", "capital" => "SÃO LUÍS", "uf" => "MA"), array("nome" => "MATO GROSSO", "capital" => "CUIABÁ", "uf" => "MT"), array("nome" => "MATO GROSSO DO SUL", "capital" => "CAMPO GRANDE", "uf" => "MS"), array("nome" => "MINAS GERAIS", "capital" => "BELO HORIZONTE", "uf" => "MG"), array("nome" => "PARÁ", "capital" => "BELÉM", "uf" => "PA"), array("nome" => "PARAÍBA", "capital" => "JOÃO PESSOA", "uf" => "PB"), array("nome" => "PARANÁ", "capital" => "CURITIBA", "uf" => "PR"), array("nome" => "PERNAMBUCO", "capital" => "RECIFE", "uf" => "PE"), array("nome" => "PIAUI", "capital" => "TERESINA", "uf" => "PI"), array("nome" => "RIO DE JANEIRO", "capital" => "RIO DE JANEIRO", "uf" => "RJ"), array("nome" => "RIO GRANDE DO NORTE", "capital" => "NATAL", "uf" => "RN"), array("nome" => "RIO GRANDE DO SUL", "capital" => "PORTO ALEGRE", "uf" => "RS"), array("nome" => "RONDÔNIA", "capital" => "PORTO VELHO", "uf" => "RO"), array("nome" => "RORAIMA", "capital" => "BOA VISTA", "uf" => "RR"), array("nome" => "SANTA CATARINA", "capital" => "FLORIANÓPOLIS", "uf" => "SC"), array("nome" => "SÃO PAULO", "capital" => "SÃO PAULO", "uf" => "SP"), array("nome" => "SERGIPE", "capital" => "ARACAJU", "uf" => "SE"), array("nome" => "TOCANTINS", "capital" => "PALMAS", "uf" => "TO"));
foreach ($estados as $estado) {
$this->command->info('Inserindo estados ' . $estado['nome'] . '-' . $estado['uf'] . ' [' . count($estados) . ']..');
\Artesaos\Estado::insert($estado);
}
}
示例2: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$protein = Nutrient::where('name', 'Iron')->first();
if ($protein == null) {
$protein = new Nutrient();
$protein->id = 303;
$protein->unit = 'mg';
$protein->name = 'Iron';
$protein->save();
}
DB::disableQueryLog();
parent::run();
}
示例3: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$protein = Nutrient::where('name', 'Vitamin A')->first();
if ($protein == null) {
$protein = new Nutrient();
$protein->id = 320;
$protein->unit = 'ug';
$protein->name = 'Vitamin A';
$protein->save();
}
DB::disableQueryLog();
parent::run();
}
示例4: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$protein = Nutrient::where('name', 'Carbohydrates')->first();
if ($protein == null) {
$protein = new Nutrient();
$protein->id = 205;
$protein->unit = 'g';
$protein->name = 'Carbohydrates';
$protein->save();
}
DB::disableQueryLog();
parent::run();
}
示例5:
/**
* @param CachingRepositoryInterface $repository
*/
function check_caching_repository_caching(CachingRepositoryInterface $repository)
{
DB::enableQueryLog();
$this->assertCount(8, $repository->inProgress()->get());
$this->assertCount(10, $repository->completed()->get());
$this->assertCount(2, DB::getQueryLog());
$this->assertCount(8, $repository->inProgress()->get());
$this->assertCount(10, $repository->completed()->get());
$this->assertCount(2, DB::getQueryLog());
$this->assertCount(18, $repository->all());
$this->assertCount(3, DB::getQueryLog());
$this->assertCount(18, $repository->all());
$this->assertCount(3, DB::getQueryLog());
DB::disableQueryLog();
\Cache::flush();
}
示例6: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::disableQueryLog();
parent::run();
}