Open saguajardo opened 3 years ago
Class starts_with not found in src/ElasticsearchServiceProvider.php
You can replace it by str_starts_with()
Your code is:
`if(version_compare($this->app->version(), '5.1', ">=") or starts_with($this->app->version(), "Lumen")) {
if ($this->app->runningInConsole()) { // Registering commands $this->commands([ ListIndicesCommand::class, CreateIndexCommand::class, UpdateIndexCommand::class, DropIndexCommand::class, ReindexCommand::class ]); }
}`
Your new code should be:
`if(version_compare($this->app->version(), '5.1', ">=") or str_starts_with($this->app->version(), "Lumen")) {
Link to the problematic line: https://github.com/basemkhirat/elasticsearch/blob/33ea95c730b35a3f29f4ba5c1ea2e2104b3eeb1a/src/ElasticsearchServiceProvider.php#L93
Class starts_with not found in src/ElasticsearchServiceProvider.php
You can replace it by str_starts_with()
Your code is:
`if(version_compare($this->app->version(), '5.1', ">=") or starts_with($this->app->version(), "Lumen")) {
}`
Your new code should be:
`if(version_compare($this->app->version(), '5.1', ">=") or str_starts_with($this->app->version(), "Lumen")) {
}`