@@ 23-35 (lines=13) @@ | ||
20 | * @param string $column |
|
21 | * @param array $arguments |
|
22 | */ |
|
23 | public function __construct($column, $arguments = []) |
|
24 | { |
|
25 | $this->column = $column; |
|
26 | ||
27 | if (count($arguments) == 1) { |
|
28 | $this->label = $this->formatLabel(); |
|
29 | $this->builder = $arguments[0]; |
|
30 | } |
|
31 | ||
32 | if (count($arguments) == 2) { |
|
33 | list($this->label, $this->builder) = $arguments; |
|
34 | } |
|
35 | } |
|
36 | ||
37 | /** |
|
38 | * Prepare input data for insert or update. |
@@ 66-80 (lines=15) @@ | ||
63 | * @param $relationName |
|
64 | * @param array $arguments |
|
65 | */ |
|
66 | public function __construct($relationName, $arguments = []) |
|
67 | { |
|
68 | $this->relationName = $relationName; |
|
69 | ||
70 | $this->column = $relationName; |
|
71 | ||
72 | if (count($arguments) == 1) { |
|
73 | $this->label = $this->formatLabel(); |
|
74 | $this->builder = $arguments[0]; |
|
75 | } |
|
76 | ||
77 | if (count($arguments) == 2) { |
|
78 | list($this->label, $this->builder) = $arguments; |
|
79 | } |
|
80 | } |
|
81 | ||
82 | /** |
|
83 | * Get validator for this field. |