当前位置: 首页>>代码示例>>PHP>>正文


PHP DB::disableQueryLog方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:nicolastanski,项目名称:cidadesbr,代码行数:9,代码来源:EstadosSeeder.php

示例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();
 }
开发者ID:lucyktan,项目名称:EECS-393-Nutrition-App,代码行数:18,代码来源:IronDataSeeder.php

示例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();
 }
开发者ID:lucyktan,项目名称:EECS-393-Nutrition-App,代码行数:18,代码来源:VitaminADataSeeder.php

示例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();
 }
开发者ID:lucyktan,项目名称:EECS-393-Nutrition-App,代码行数:18,代码来源:CarbohydrateDataSeeder.php

示例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();
 }
开发者ID:logaretm,项目名称:depo,代码行数:19,代码来源:CachingRepositoryTest.php

示例6: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::disableQueryLog();
     parent::run();
 }
开发者ID:lucyktan,项目名称:EECS-393-Nutrition-App,代码行数:10,代码来源:FoodDataSeeder.php


注:本文中的Illuminate\Support\Facades\DB::disableQueryLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。