{"id":17275104,"url":"https://github.com/daun/statamic-widget-collection-count","last_synced_at":"2025-04-14T08:41:25.302Z","repository":{"id":226494230,"uuid":"768845459","full_name":"daun/statamic-widget-collection-count","owner":"daun","description":"Display the number of entries per collection in your Statamic control panel","archived":false,"fork":false,"pushed_at":"2025-04-13T10:58:41.000Z","size":690,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T11:17:21.090Z","etag":null,"topics":["control-panel","counter","statamic","statamic-addon","widget"],"latest_commit_sha":null,"homepage":"https://statamic.com/addons/daun/collection-count-widget","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-07T20:56:37.000Z","updated_at":"2025-04-13T10:57:36.000Z","dependencies_parsed_at":"2024-07-11T11:15:16.694Z","dependency_job_id":"6a19eb81-821f-4d19-b2fa-c7a0ad372f7f","html_url":"https://github.com/daun/statamic-widget-collection-count","commit_stats":null,"previous_names":["daun/statamic-widget-collection-count"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-widget-collection-count","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-widget-collection-count/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-widget-collection-count/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-widget-collection-count/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daun","download_url":"https://codeload.github.com/daun/statamic-widget-collection-count/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848874,"owners_count":21171471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["control-panel","counter","statamic","statamic-addon","widget"],"created_at":"2024-10-15T08:55:26.959Z","updated_at":"2025-04-14T08:41:25.296Z","avatar_url":"https://github.com/daun.png","language":"PHP","readme":"# Statamic Widget: Collection Count\n\nControl panel widget for [Statamic](https://statamic.com/) that displays the\ncount of entries for a given collection or taxonomy.\n\n![Collection Count Widget Screenshot](./art/collection-count-widget.png)\n\n## Installation\n\nFrom your project root, run:\n\n```sh\ncomposer require daun/statamic-widget-collection-count\n```\n\nAlternatively, you can install the addon via the control panel.\n\n## Usage\n\nAdd the widget to your control panel dashboard by adding it to the `widgets` array in the\n`config/statamic/cp.php` config file. Pass in the name of the collection to show.\n\n```php\nreturn [\n    'widgets' =\u003e [\n        [\n            'type' =\u003e 'collection_count',\n            'collection' =\u003e 'projects'\n        ]\n    ]\n];\n```\n\n## Options\n\n### Ignore draft entries\n\nBy default, all entries are counted, including drafts. Set the `count_unpublished` variable to\n`false` to only count published entries.\n\n```php\nreturn [\n    'widgets' =\u003e [\n        [\n            'type' =\u003e 'collection_count',\n            'collection' =\u003e 'projects',\n            'count_unpublished' =\u003e false,\n        ]\n    ]\n];\n```\n\n### Apply custom query scopes\n\nPass in the `query_scope` param to apply [custom scopes](https://statamic.dev/extending/query-scopes-and-filters) before counting.\n\n```php\nreturn [\n    'widgets' =\u003e [\n        [\n            'type' =\u003e 'collection_count',\n            'collection' =\u003e 'projects',\n            'query_scope' =\u003e 'archived',\n        ]\n    ]\n];\n```\n\n### Usage with taxonomies\n\nThe widget will happily count taxonomy terms as well. Just use the taxonomy name instead.\n\n```php\nreturn [\n    'widgets' =\u003e [\n        [\n            'type' =\u003e 'collection_count',\n            'collection' =\u003e 'tags',\n        ]\n    ]\n];\n```\n\n## Requirements\n\nStatamic 3/4/5+\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaun%2Fstatamic-widget-collection-count","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaun%2Fstatamic-widget-collection-count","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaun%2Fstatamic-widget-collection-count/lists"}