my migrations file is like that in your article:
`final class CreateUsersIndex implements MigrationInterface
{
/**
Run the migration.
*/
public function up(): void
{
Index::create(‘users’, function (Mapping $mapping, Settings $settings) {
$mapping->text(‘name’);
$mapping->keyword(‘email’);
});
}
/**
Reverse the migration.
*/
public function down(): void
{
Index::dropIfExists(‘users’);
}
}`
Trying to follow your guide posted at https://itnext.io/the-ultimate-guide-to-elasticsearch-in-laravel-application-ee636b79419c, and keep getting an error like this: ErrorException
Use of undefined constant ‘users’ - assumed '‘users’' (this will throw an Error in a future version of PHP)
at elastic/migrations/2021_01_30_075117_create_users_index.php:16 12▕ Run the migration. 13▕ / 14▕ public function up(): void 15▕ { ➜ 16▕ Index::create(‘users’, function (Mapping $mapping, Settings $settings) { 17▕ $mapping->text(‘name’); 18▕ $mapping->keyword(‘email’); 19▕ }); 20▕ }
1 elastic/migrations/2021_01_30_075117_create_users_index.php:16 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError()
20 artisan:37 Illuminate\Foundation\Console\Kernel::handle()
my migrations file is like that in your article: `final class CreateUsersIndex implements MigrationInterface { /**
Run the migration. */ public function up(): void { Index::create(‘users’, function (Mapping $mapping, Settings $settings) { $mapping->text(‘name’); $mapping->keyword(‘email’); }); }
/**
Thank you