Skip to content

Commit 2037643

Browse files
committed
Check SHOULD_RETURN_COLLECTION is not defined
1 parent accdedf commit 2037643

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Jenssegers/Mongodb/MongodbServiceProvider.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ public function boot()
1515

1616
Model::setEventDispatcher($this->app['events']);
1717

18-
$s = explode('.', \Illuminate\Foundation\Application::VERSION);
19-
define('SHOULD_RETURN_COLLECTION', (10 * $s[0] + $s[1]) >= 53);
18+
if(!defined('SHOULD_RETURN_COLLECTION')) {
19+
$s = explode('.', \Illuminate\Foundation\Application::VERSION);
20+
define('SHOULD_RETURN_COLLECTION', (10 * $s[0] + $s[1]) >= 53);
21+
}
2022
}
2123

2224
/**

0 commit comments

Comments
 (0)