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

Added search

This commit is contained in:
Dan Brown
2015-07-16 19:53:24 +01:00
parent 787ad20ce7
commit 4c0783fdc7
8 changed files with 82 additions and 9 deletions

View File

@ -132,6 +132,15 @@ class PageController extends Controller
return redirect($page->getUrl());
}
public function searchAll(Request $request)
{
$searchTerm = $request->get('term');
if(empty($searchTerm)) return redirect()->back();
$pages = $this->pageRepo->getBySearch($searchTerm);
return view('pages/search-results', ['pages' => $pages, 'searchTerm' => $searchTerm]);
}
/**
* Remove the specified resource from storage.
*