Skip to content

Commit

Permalink
perf(laravel): making phpstan happy
Browse files Browse the repository at this point in the history
  • Loading branch information
amermchaudhary committed Oct 23, 2024
1 parent cc206e8 commit 898ab51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Laravel/Eloquent/Metadata/ModelMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 898ab51

Please sign in to comment.