Illuminate\Database\Query\Builder::truncate PHP Method

truncate() public method

Run a truncate statement on the table.
public truncate ( ) : void
return void
    public function truncate()
    {
        foreach ($this->grammar->compileTruncate($this) as $sql => $bindings) {
            $this->connection->statement($sql, $bindings);
        }
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Run a truncate statement on the table.
  */
 public function truncate()
 {
     parent::truncate();
     $this->handler->setBuilder($this)->setValues([])->setSqlOperation('truncate')->invalidateQuery('truncate');
 }
All Usage Examples Of Illuminate\Database\Query\Builder::truncate