flushAll() public method

刷新所有缓存,调用此方法让所有缓存过期。 仅用于执行 Migration 以后调用
public flushAll ( string $db, string $table )
$db string 数据库名称
$table string 表名
Beispiel #1
0
 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);
 }