| @@ 67-79 (lines=13) @@ | ||
| 64 | * @param string $column | |
| 65 | * @param array $arguments | |
| 66 | */ | |
| 67 | public function __construct($column, $arguments = []) | |
| 68 |     { | |
| 69 | $this->column = $column; | |
| 70 | ||
| 71 |         if (count($arguments) == 1) { | |
| 72 | $this->label = $this->formatLabel(); | |
| 73 | $this->builder = $arguments[0]; | |
| 74 | } | |
| 75 | ||
| 76 |         if (count($arguments) == 2) { | |
| 77 | list($this->label, $this->builder) = $arguments; | |
| 78 | } | |
| 79 | } | |
| 80 | ||
| 81 | /** | |
| 82 | * Prepare input data for insert or update. | |
| @@ 120-134 (lines=15) @@ | ||
| 117 | * @param $relationName | |
| 118 | * @param array $arguments | |
| 119 | */ | |
| 120 | public function __construct($relationName, $arguments = []) | |
| 121 |     { | |
| 122 | $this->relationName = $relationName; | |
| 123 | ||
| 124 | $this->column = $relationName; | |
| 125 | ||
| 126 |         if (count($arguments) == 1) { | |
| 127 | $this->label = $this->formatLabel(); | |
| 128 | $this->builder = $arguments[0]; | |
| 129 | } | |
| 130 | ||
| 131 |         if (count($arguments) == 2) { | |
| 132 | list($this->label, $this->builder) = $arguments; | |
| 133 | } | |
| 134 | } | |
| 135 | ||
| 136 | /** | |
| 137 | * Get validator for this field. | |