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

Developed basic search queries.

Updated search & permission regen commands with ability to specify
database.
This commit is contained in:
Dan Brown
2017-03-26 19:24:57 +01:00
parent 070d4aeb6c
commit 1552417598
5 changed files with 68 additions and 18 deletions

View File

@ -16,7 +16,7 @@ class DummyContentSeeder extends Seeder
$user->attachRole($role);
$books = factory(\BookStack\Book::class, 20)->create(['created_by' => $user->id, 'updated_by' => $user->id])
factory(\BookStack\Book::class, 20)->create(['created_by' => $user->id, 'updated_by' => $user->id])
->each(function($book) use ($user) {
$chapters = factory(\BookStack\Chapter::class, 5)->create(['created_by' => $user->id, 'updated_by' => $user->id])
->each(function($chapter) use ($user, $book){
@ -28,7 +28,7 @@ class DummyContentSeeder extends Seeder
$book->pages()->saveMany($pages);
});
$restrictionService = app(\BookStack\Services\PermissionService::class);
$restrictionService->buildJointPermissions();
app(\BookStack\Services\PermissionService::class)->buildJointPermissions();
app(\BookStack\Services\SearchService::class)->indexAllEntities();
}
}