@@ -54,17 +54,17 @@ |
||
| 54 | 54 | foreach ($directives as $directive) { |
| 55 | 55 | $name = $directive->name->value; |
| 56 | 56 | switch ($name) { |
| 57 | - case 'belongsToMany': |
|
| 58 | - $type1 = $this->lowerName; |
|
| 59 | - $type2 = $lowerName; |
|
| 60 | - if (strcasecmp($type1, $type2) < 0) { // TODO: check this, might not work |
|
| 61 | - $relationship = mb_strtolower($this->getInflector()->pluralize($field->name)); |
|
| 62 | - $this->extraCode[] = $this->makeManyToManySeed($type1, $type2, $relationship); |
|
| 63 | - } |
|
| 64 | - break; |
|
| 65 | - case 'morphedByMany': |
|
| 66 | - // TODO $relation = Parser::getDirectiveArgumentByName($directive, 'relation', $lowerName); |
|
| 67 | - break; |
|
| 57 | + case 'belongsToMany': |
|
| 58 | + $type1 = $this->lowerName; |
|
| 59 | + $type2 = $lowerName; |
|
| 60 | + if (strcasecmp($type1, $type2) < 0) { // TODO: check this, might not work |
|
| 61 | + $relationship = mb_strtolower($this->getInflector()->pluralize($field->name)); |
|
| 62 | + $this->extraCode[] = $this->makeManyToManySeed($type1, $type2, $relationship); |
|
| 63 | + } |
|
| 64 | + break; |
|
| 65 | + case 'morphedByMany': |
|
| 66 | + // TODO $relation = Parser::getDirectiveArgumentByName($directive, 'relation', $lowerName); |
|
| 67 | + break; |
|
| 68 | 68 | default: |
| 69 | 69 | break; |
| 70 | 70 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | return new GeneratedCollection( |
| 41 | - [ new GeneratedItem( |
|
| 41 | + [new GeneratedItem( |
|
| 42 | 42 | GeneratedItem::TYPE_SEED, |
| 43 | 43 | $this->generateString(), |
| 44 | 44 | $this->getGenerateFilename() |
@@ -101,6 +101,6 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | public function getGenerateFilename(): string |
| 103 | 103 | { |
| 104 | - return $this->getBasePath('database/seeds/'. $this->studlyName . 'Seeder.php'); |
|
| 104 | + return $this->getBasePath('database/seeds/' . $this->studlyName . 'Seeder.php'); |
|
| 105 | 105 | } |
| 106 | 106 | } |