{"id":15023025,"url":"https://github.com/jream/route","last_synced_at":"2025-04-09T19:51:10.826Z","repository":{"id":78658769,"uuid":"85635513","full_name":"JREAM/route","owner":"JREAM","description":"Simplest PHP Router Ever, 1 File, Make it Your Own","archived":false,"fork":false,"pushed_at":"2017-03-20T22:59:06.000Z","size":2,"stargazers_count":23,"open_issues_count":1,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T21:45:56.483Z","etag":null,"topics":["php","php-router","php-router-standalone","php5","router"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JREAM.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-03-20T22:57:40.000Z","updated_at":"2025-03-15T20:49:02.000Z","dependencies_parsed_at":"2023-03-03T14:30:34.378Z","dependency_job_id":null,"html_url":"https://github.com/JREAM/route","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Froute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Froute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Froute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Froute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JREAM","download_url":"https://codeload.github.com/JREAM/route/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103907,"owners_count":21048244,"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":["php","php-router","php-router-standalone","php5","router"],"created_at":"2024-09-24T19:58:38.983Z","updated_at":"2025-04-09T19:51:10.821Z","avatar_url":"https://github.com/JREAM.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Route\n***\n\nI made this in 2011, it is a no-nonsense PHP Router. It\nrequires no dependencies. Fork it and have fun with it.\n\nThis is a class with two methods! I figured I'd port this over from\nmy old repositories. There are a thousand routers, all and everything\nbuilt into frameworks -- sometimes it's fun to go back to the basics.\n\nThis project was Inspired by [Klein](https://github.com/chriso/klein.php)\n\n## Requirements\n\nYou need `PHP 5.3` or higher.\n\n## How to use\n\nYou only need two files:\n\n- 1: `route.php`\n- 2: `.htaccess`\n\nThe `.htaccess` redirects all requests to `index.php?uri=$`.\n\nYou can run everything from the index.php file, see the file for usage.\n\n## Examples\n\nRequire the route.php file and create an instance.\n```php\nrequire_once 'route.php';\n\n$route = new Route();\n```\n\nHere is how you'd add your home page.\n\n```php\n$route-\u003eadd('/', function() {\n  echo 'This is the home page, there is no template engine';\n});\n```\n\nHere is how to add arguments\n\n```php\n$route-\u003eadd('/name/.+/age/.+', function($name, $age) {\n  echo \"Your name is $name and you are $age years old\";\n});\n```\n\nAfter all routes are defined, you always end it with:\n\n```php\n$route-\u003elisten();\n```\n\n***\n\nCopyright (C), 2012 Jesse Boyer (\u003chttp://jream.com\u003e)\nGNU General Public License 3 (\u003chttp://www.gnu.org/licenses/\u003e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjream%2Froute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjream%2Froute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjream%2Froute/lists"}