@@ 139-153 (lines=15) @@ | ||
136 | * |
|
137 | * @return bool |
|
138 | */ |
|
139 | protected function needsSlugging(string $attribute, array $config): bool |
|
140 | { |
|
141 | if ( |
|
142 | $config['onUpdate'] === true || |
|
143 | empty($this->model->getAttributeValue($attribute)) |
|
144 | ) { |
|
145 | return true; |
|
146 | } |
|
147 | ||
148 | if ($this->model->isDirty($attribute)) { |
|
149 | return false; |
|
150 | } |
|
151 | ||
152 | return (!$this->model->exists); |
|
153 | } |
|
154 | ||
155 | /** |
|
156 | * Get the source strings for the slug. |
@@ 125-139 (lines=15) @@ | ||
122 | * |
|
123 | * @return bool |
|
124 | */ |
|
125 | protected function needsSlugging(string $attribute, array $config): bool |
|
126 | { |
|
127 | if ( |
|
128 | $config['onUpdate'] === true || |
|
129 | empty($this->model->getAttributeValue($attribute)) |
|
130 | ) { |
|
131 | return true; |
|
132 | } |
|
133 | ||
134 | if ($this->model->isDirty($attribute)) { |
|
135 | return false; |
|
136 | } |
|
137 | ||
138 | return (!$this->model->exists); |
|
139 | } |
|
140 | ||
141 | /** |
|
142 | * Get the source strings for the slug. |