| @@ 126-135 (lines=10) @@ | ||
| 123 | * @param array|mixed $options |
|
| 124 | * @return $this |
|
| 125 | */ |
|
| 126 | public function options($options) |
|
| 127 | { |
|
| 128 | if ($options instanceof Arrayable) { |
|
| 129 | $options = $options->toArray(); |
|
| 130 | } |
|
| 131 | ||
| 132 | $this->attributes['options'] = $options; |
|
| 133 | ||
| 134 | return $this; |
|
| 135 | } |
|
| 136 | ||
| 137 | /** |
|
| 138 | * Get options from a table. |
|
| @@ 229-238 (lines=10) @@ | ||
| 226 | * @return static |
|
| 227 | * @see https://datatables.net/reference/option/columns.searchPanes.options |
|
| 228 | */ |
|
| 229 | public function options($value) |
|
| 230 | { |
|
| 231 | if ($value instanceof Arrayable) { |
|
| 232 | $value = $value->toArray(); |
|
| 233 | } |
|
| 234 | ||
| 235 | $this->attributes['options'] = $value; |
|
| 236 | ||
| 237 | return $this; |
|
| 238 | } |
|
| 239 | ||
| 240 | /** |
|
| 241 | * Get options from a table. |
|