@@ -156,7 +156,13 @@ public function handle($request, Closure $next)
156
156
'value ' => '0 ' ,
157
157
]);
158
158
159
- if ((int ) Str::replace ('. ' , '' , config ('laravel-crm.version ' )) >= 180 ) {
159
+ if (Str::startsWith (config ('laravel-crm.version ' ), '0. ' )) {
160
+ $ currentVersion = (int ) Str::replace ('. ' , '' , config ('laravel-crm.version ' ));
161
+ } else {
162
+ $ currentVersion = (int ) Str::replace ('. ' , '' , config ('laravel-crm.version ' ) * 10 );
163
+ }
164
+
165
+ if ($ currentVersion >= 180 ) {
160
166
Setting::firstOrCreate ([
161
167
'global ' => 1 ,
162
168
'name ' => 'db_update_0180 ' ,
@@ -165,7 +171,7 @@ public function handle($request, Closure $next)
165
171
]);
166
172
}
167
173
168
- if (( int ) Str:: replace ( ' . ' , '' , config ( ' laravel-crm.version ' )) >= 181 ) {
174
+ if ($ currentVersion >= 181 ) {
169
175
Setting::firstOrCreate ([
170
176
'global ' => 1 ,
171
177
'name ' => 'db_update_0181 ' ,
@@ -174,7 +180,7 @@ public function handle($request, Closure $next)
174
180
]);
175
181
}
176
182
177
- if (( int ) Str:: replace ( ' . ' , '' , config ( ' laravel-crm.version ' )) >= 191 ) {
183
+ if ($ currentVersion >= 191 ) {
178
184
Setting::firstOrCreate ([
179
185
'global ' => 1 ,
180
186
'name ' => 'db_update_0191 ' ,
@@ -183,7 +189,7 @@ public function handle($request, Closure $next)
183
189
]);
184
190
}
185
191
186
- if (( int ) Str:: replace ( ' . ' , '' , config ( ' laravel-crm.version ' )) >= 193 ) {
192
+ if ($ currentVersion >= 193 ) {
187
193
Setting::firstOrCreate ([
188
194
'global ' => 1 ,
189
195
'name ' => 'db_update_0193 ' ,
@@ -192,7 +198,7 @@ public function handle($request, Closure $next)
192
198
]);
193
199
}
194
200
195
- if (( int ) Str:: replace ( ' . ' , '' , config ( ' laravel-crm.version ' )) >= 194 ) {
201
+ if ($ currentVersion >= 194 ) {
196
202
Setting::firstOrCreate ([
197
203
'global ' => 1 ,
198
204
'name ' => 'db_update_0194 ' ,
@@ -201,7 +207,7 @@ public function handle($request, Closure $next)
201
207
]);
202
208
}
203
209
204
- if (( int ) Str:: replace ( ' . ' , '' , config ( ' laravel-crm.version ' )) >= 199 ) {
210
+ if ($ currentVersion >= 199 ) {
205
211
Setting::firstOrCreate ([
206
212
'global ' => 1 ,
207
213
'name ' => 'db_update_0199 ' ,
0 commit comments