| Total Complexity | 7 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class OptionType extends SingleType |
||
| 8 | { |
||
| 9 | protected $needsTableInit = true; |
||
| 10 | protected $hasOptions = true; |
||
| 11 | |||
| 12 | public function getSchema() |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getPivotSchema() |
||
| 21 | { |
||
| 22 | $schema = '$table->string("title", 192);'.PHP_EOL.$this->getTabs(3); |
||
| 23 | $schema .= '$table->timestamps();'.PHP_EOL.$this->getTabs(3); |
||
| 24 | return $schema; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getRelatedModel() |
||
| 28 | { |
||
| 29 | return $this->getPivot(); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getPivotTable() |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getMigrationPivot() |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getPivot() |
||
| 43 | { |
||
| 44 | return $this->getParentModel().ucfirst(Str::camel($this->columnName)); |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getTypeColumns() |
||
| 50 | } |
||
| 51 | } |
||
| 52 |