Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function getSchema() |
||
12 | { |
||
13 | $schema = ""; |
||
14 | $parentTable = $this->hasSelfParent() ? $this->getParentModule() : $this->typeOption; |
||
15 | $schema .= "\$table->bigInteger('".$this->getForeignKey()."')->unsigned()->nullable();".PHP_EOL.$this->getTabs(3); |
||
16 | $schema .= "\$table->foreign('".$this->getForeignKey()."')->references('id')->on('$parentTable')->onDelete('set null');".PHP_EOL; |
||
17 | return $schema; |
||
18 | } |
||
35 |