diff --git a/src/Laravel/Eloquent/Metadata/ModelMetadata.php b/src/Laravel/Eloquent/Metadata/ModelMetadata.php index 5b4c9c64a5..62f1b7839b 100644 --- a/src/Laravel/Eloquent/Metadata/ModelMetadata.php +++ b/src/Laravel/Eloquent/Metadata/ModelMetadata.php @@ -66,9 +66,11 @@ public function getAttributes(Model $model): Collection $connection = $model->getConnection(); $schema = $connection->getSchemaBuilder(); $table = $model->getTable(); + /** @var array $columns */ $columns = Cache::flexible('api-platform.tables.'.$table, [5, 10], function () use ($schema, $table) { return $schema->getColumns($table); }); + /** @var array $indexes */ $indexes = Cache::flexible('api-platform.indexes.'.$table, [5, 10], function () use ($schema, $table) { return $schema->getIndexes($table); });