Пример #1
0
 /**
  * Generates the model and migration for/with laravel and extends the contents of the generated classes.
  * @param \DOMNode $node The node of the table.
  * @return MakeMWBModel|bool False if the table should be ignored.
  */
 protected function loadModelTable(\DOMNode $node)
 {
     $tableObject = new TableMigration();
     $loaded = $tableObject->load($node);
     if ($loaded && in_array($tableObject->getName(), $this->pivotTables)) {
         $tableObject->isPivotTable(true);
     } else {
         if ($tableObject->isPivotTable()) {
             $this->pivotTables[] = $tableObject->getName();
         }
     }
     // else if
     return $loaded ? $tableObject : false;
 }