{"id":18779881,"url":"https://github.com/mazesec/pagify","last_synced_at":"2025-09-02T00:32:33.716Z","repository":{"id":253930135,"uuid":"844995589","full_name":"mazesec/pagify","owner":"mazesec","description":"Pagify is a modern PHP library for handling JSON pagination efficiently","archived":false,"fork":false,"pushed_at":"2024-08-20T11:31:02.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T12:27:15.358Z","etag":null,"topics":["json-paginator","pagination"],"latest_commit_sha":null,"homepage":"","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/mazesec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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-08-20T11:30:08.000Z","updated_at":"2024-08-20T11:30:50.000Z","dependencies_parsed_at":"2024-08-20T12:22:04.494Z","dependency_job_id":"d0ffb1c6-ad79-43f4-92fa-fa4d987afbaa","html_url":"https://github.com/mazesec/pagify","commit_stats":null,"previous_names":["tal7aouy/pagify","0xm4ze/pagify","mazesec/pagify"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mazesec/pagify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazesec%2Fpagify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazesec%2Fpagify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazesec%2Fpagify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazesec%2Fpagify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazesec","download_url":"https://codeload.github.com/mazesec/pagify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazesec%2Fpagify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273213758,"owners_count":25065058,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["json-paginator","pagination"],"created_at":"2024-11-07T20:23:37.108Z","updated_at":"2025-09-02T00:32:33.372Z","avatar_url":"https://github.com/mazesec.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pagify\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/tal7aouy/pagify/CI)\n![Packagist](https://img.shields.io/packagist/v/tal7aouy/pagify)\n![License](https://img.shields.io/github/license/tal7aouy/pagify)\n![PHP](https://img.shields.io/badge/php-%3E%3D8.0-blue)\n\n**Pagify** is a modern PHP library for handling JSON pagination efficiently. Designed to be simple yet powerful, this library helps you paginate data seamlessly for APIs and web applications.\n\n## Features\n\n-   **Easy Integration**: Simple to use with minimal setup.\n-   **Flexible Configuration**: Customize page size and pagination behavior.\n-   **Error Handling**: Graceful handling of invalid parameters.\n-   **CLI Tool**: Command-line utility for quick testing and usage.\n-   **Logging**: Built-in logging for debugging and monitoring.\n\n## Installation\n\nYou can install Pagify using Composer:\n\n```bash\ncomposer require tal7aouy/pagify\n```\n\n## Usage\n\n### Basic Usage\n\n```php\nuse Tal7aouy\\Pagify\\JsonPaginator;\nuse Tal7aouy\\Pagify\\PaginatorFactory;\n\n$items = range(1, 100); // Example data\n$totalItems = count($items);\n$paginator = PaginatorFactory::createPaginator($items, $totalItems, 1, 10);\n\necho $paginator-\u003etoJson();\n```\n\n### CLI Tool\n\nTo use the CLI tool, run:\n\n```bash\n./pagify \u003ccurrentPage\u003e \u003cperPage\u003e\n```\n\nExample:\n\n```bash\n./pagify 2 10\n```\n\n## Configuration\n\nYou can configure default settings in `config/paginator.php`:\n\n```php\nreturn [\n    'default_per_page' =\u003e 10,\n];\n```\n\n## Testing\n\n### Unit Tests\n\nRun unit tests with PestPHP:\n\n```bash\ncomposer test\n```\n\n### Example Test\n\n```php\nit('paginates data correctly', function () {\n    // Test code here...\n});\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request. For more details, see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\nMade with ❤️ by [Mhammed Talhaouy](https://github.com/tal7aouy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazesec%2Fpagify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazesec%2Fpagify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazesec%2Fpagify/lists"}