useDefaultSchemaGrammar() public method

Set the schema grammar to the default implementation.
public useDefaultSchemaGrammar ( ) : void
return void
Example #1
0
 /**
  * Get the schema grammar out of a migration connection.
  *
  * @param  \Illuminate\Database\Connection  $connection
  * @return \Illuminate\Database\Schema\Grammars\Grammar
  */
 protected function getSchemaGrammar($connection)
 {
     if (is_null($grammar = $connection->getSchemaGrammar())) {
         $connection->useDefaultSchemaGrammar();
         $grammar = $connection->getSchemaGrammar();
     }
     return $grammar;
 }