Add the ability to filter components by tags. Closes #2920

This commit is contained in:
James Brooks
2018-06-18 21:22:43 +01:00
parent 77281a7cc5
commit ab64572274
4 changed files with 12 additions and 11 deletions

View File

@@ -37,6 +37,10 @@ class ComponentController extends AbstractApiController
$components = Component::enabled();
}
if ($tags = Binput::get('tags')) {
$components->withAnyTags($tags);
}
$components->search(Binput::except(['sort', 'order', 'per_page']));
if ($sortBy = Binput::get('sort')) {