{"id":15080797,"url":"https://github.com/makscraft/pagination","last_synced_at":"2026-01-29T10:03:02.501Z","repository":{"id":250303591,"uuid":"834066873","full_name":"makscraft/pagination","owner":"makscraft","description":"Pagination manager for Symfony application.","archived":false,"fork":false,"pushed_at":"2024-11-07T12:24:22.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T20:23:25.733Z","etag":null,"topics":["php","symfony","twig"],"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/makscraft.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-07-26T10:47:51.000Z","updated_at":"2024-11-07T12:24:25.000Z","dependencies_parsed_at":"2024-11-07T13:27:13.569Z","dependency_job_id":"ce8437ad-5a0f-411d-96c0-aa61063bfa42","html_url":"https://github.com/makscraft/pagination","commit_stats":{"total_commits":24,"total_committers":4,"mean_commits":6.0,"dds":"0.33333333333333337","last_synced_commit":"0ca5426672b997cf6e37f46d0240f4417489e1b8"},"previous_names":["maxizdev/pagination","rivacraft/pagination","makscraft/pagination"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/makscraft/pagination","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makscraft%2Fpagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makscraft%2Fpagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makscraft%2Fpagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makscraft%2Fpagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makscraft","download_url":"https://codeload.github.com/makscraft/pagination/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makscraft%2Fpagination/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28875446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T09:47:23.353Z","status":"ssl_error","status_checked_at":"2026-01-29T09:47:19.357Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["php","symfony","twig"],"created_at":"2024-09-25T05:31:33.944Z","updated_at":"2026-01-29T10:03:02.477Z","avatar_url":"https://github.com/makscraft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pagination\nPagination manager for Symfony applications.\n\nGenerates list of links and parameters for SQL queries.\n\n![pagination](https://github.com/user-attachments/assets/620c1f38-3b7d-4764-b186-38c5e2031e7c)\n\n\nInstallation\n---\n```\ncomposer require makscraft/pagination\n```\n\nExample of use in controller or repository\n---\n\n```\nuse Makscraft\\Pagination;\n\n$total = ... ; //count your all needed items\n$limit = 20; //items per page\n\n$pagination = new Pagination($total, $limit);\n$repository -\u003e findBy([...], [...], $pagination -\u003e getLimit(), $pagination -\u003e getOffset());\n  \n//Returns array of links for html template.\n$data = $pagination -\u003e setPath('/catalog') -\u003e getDisplayData();\n```\nResult links in $data will look like: '/catalog?page=3'.\n\nYou can pass the path with additional GET parameters if you want.\n\n```\n$pagination -\u003e setPath('/catalog?sort=name\u0026direction=asc');\n```\n\nFor twig templates\n---\n\nUse package twig template or copy it into templates directory of your project.\nInside the controller pass the pagination object into template.\n```\nreturn $this -\u003e render('mypage.html.twig', [\n    \n    ...\n    \n    'pagination' =\u003e $pagination\n]);\n```\nTo use template from vendor directory add the path into twig config file.\n```\n# config/packages/twig.yaml    \npaths:\n    'vendor/makscraft/pagination/templates': 'pagination'\n\n```\nNext include the pagination template into your twig files.\n```\n{% include '@pagination/pagination.html.twig' %}\n```\n\nAlso you can copy the template file into your templates directory and use it as you like.\n\nTemplate file location: **vendor/makscraft/pagination/templates/pagination.html.twig**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakscraft%2Fpagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakscraft%2Fpagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakscraft%2Fpagination/lists"}