flushAll() 공개 메소드

刷新所有缓存,调用此方法让所有缓存过期。 仅用于执行 Migration 以后调用
public flushAll ( string $db, string $table )
$db string 数据库名称
$table string 表名
예제 #1
0
파일: Blueprint.php 프로젝트: angejia/pea
 public function build(Connection $connection, Grammar $grammar)
 {
     $statements = $this->toSql($connection, $grammar);
     if (!$statements) {
         throw new \RuntimeException('migration must be created with Blueprint');
     }
     foreach ($statements as $statement) {
         $connection->statement($statement);
     }
     $db = $connection->getDatabaseName();
     $table = $this->getTable();
     $this->meta->flushAll($db, $table);
 }