Ejemplo n.º 1
0
 /**
  * Append the character set specifications to a command.
  *
  * @param  string  $sql
  * @param  \Illuminate\Database\Connection  $connection
  * @return string
  */
 protected function compileCreateEncoding($sql, Connection $connection)
 {
     if (!is_null($charset = $connection->getConfig('charset'))) {
         $sql .= ' default character set ' . $charset;
     }
     if (!is_null($collation = $connection->getConfig('collation'))) {
         $sql .= ' collate ' . $collation;
     }
     return $sql;
 }