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

Started build of tag view

- Created listing
- Allows drilldown to tag name
- Shows totals

Not yet covered via testing
This commit is contained in:
Dan Brown
2021-11-06 16:30:20 +00:00
parent 8d7c8ac8bf
commit 929c8312bd
13 changed files with 213 additions and 28 deletions

View File

@ -17,6 +17,24 @@ class TagController extends Controller
$this->tagRepo = $tagRepo;
}
/**
* Show a listing of existing tags in the system.
*/
public function index(Request $request)
{
$search = $request->get('search', '');
$nameFilter = $request->get('name', '');
$tags = $this->tagRepo
->queryWithTotals($search, $nameFilter)
->paginate(20);
return view('tags.index', [
'tags' => $tags,
'search' => $search,
'nameFilter' => $nameFilter,
]);
}
/**
* Get tag name suggestions from a given search term.
*/