1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added regenerate-references command test

Also updated model resolvers to only fetch model ID, to prevent bringing
back way more data from database than desired.
This commit is contained in:
Dan Brown
2022-08-17 16:59:23 +01:00
parent 5d29d0cc7b
commit 3290ab3ac9
7 changed files with 38 additions and 6 deletions

View File

@ -19,7 +19,7 @@ class BookshelfLinkModelResolver implements CrossLinkModelResolver
$shelfSlug = $matches[1];
/** @var ?Bookshelf $model */
$model = Bookshelf::query()->where('slug', '=', $shelfSlug)->first();
$model = Bookshelf::query()->where('slug', '=', $shelfSlug)->first(['id']);
return $model;
}