getDriverName(), ['mysql', 'pgsql']); } /** * Get id and basic elements of this model. * * @codeCoverageIgnore */ public static function id(Model $model): array { if (config('scout.driver') === 'database') { return []; } $id = $model->getKey(); if ($id !== null && $model->getKeyType() === 'string' || config('scout.driver') === 'typesense') { $id = (string) $id; } return [ 'id' => $id, 'vault_id' => (string) $model->getAttribute('vault_id'), 'created_at' => (int) optional($model->getAttribute(Model::CREATED_AT))->timestamp, 'updated_at' => (int) optional($model->getAttribute(Model::UPDATED_AT))->timestamp, ]; } }