@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | public function get($columns = ['*']) |
| 111 | 111 | { |
| 112 | 112 | |
| 113 | - if ($this->model !== null && !empty( $this->dynamicColumns)) { |
|
| 113 | + if ($this->model !== null && !empty($this->dynamicColumns)) { |
|
| 114 | 114 | $i = 0; |
| 115 | 115 | foreach ($this->wheres as $where) { |
| 116 | 116 | if (strpos($where['column'], '->')) { |
| 117 | 117 | $parts = explode('->', $where['column'], 2); |
| 118 | - if (in_array($parts[0], $this->dynamicColumns)) { |
|
| 118 | + if (in_array($parts[0], $this->dynamicColumns)) { |
|
| 119 | 119 | $this->wheres[$i]['column'] = DB::raw("COLUMN_GET(`$parts[0]`, '$parts[1]' as char)"); |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | return collect( |
| 128 | 128 | $this->onceWithColumns( |
| 129 | 129 | Arr::wrap($columns), |
| 130 | - function () { |
|
| 130 | + function() { |
|
| 131 | 131 | return $this->processor->processSelect($this, $this->runSelect()); |
| 132 | 132 | } |
| 133 | 133 | ) |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | static::addGlobalScope(new DynamicScope()); |
| 17 | 17 | static::saving( |
| 18 | - function ($model) { |
|
| 18 | + function($model) { |
|
| 19 | 19 | foreach ($model->getCasts() as $column => $cast) { |
| 20 | 20 | if ($cast == 'Halalsoft\LaravelDynamicColumn\Dynamic') { |
| 21 | 21 | $model->$column = $model->$column; |