{"id":18665388,"url":"https://github.com/olivecms/router","last_synced_at":"2025-09-03T08:42:39.889Z","repository":{"id":57030954,"uuid":"146085500","full_name":"OliveCMS/Router","owner":"OliveCMS","description":"OliveCMS Router with host handle","archived":false,"fork":false,"pushed_at":"2018-12-31T07:52:40.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T17:34:19.763Z","etag":null,"topics":["arshen","composer","easy-router","olive-cms","php","php-router","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OliveCMS.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}},"created_at":"2018-08-25T10:14:19.000Z","updated_at":"2018-12-31T07:51:54.000Z","dependencies_parsed_at":"2022-08-23T18:50:44.624Z","dependency_job_id":null,"html_url":"https://github.com/OliveCMS/Router","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliveCMS%2FRouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliveCMS%2FRouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliveCMS%2FRouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliveCMS%2FRouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OliveCMS","download_url":"https://codeload.github.com/OliveCMS/Router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239492689,"owners_count":19647994,"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":["arshen","composer","easy-router","olive-cms","php","php-router","router"],"created_at":"2024-11-07T08:27:27.813Z","updated_at":"2025-02-18T14:50:21.364Z","avatar_url":"https://github.com/OliveCMS.png","language":"PHP","readme":"# Router\n\nOliveCMS Router with host handle\n\n## Installation\n\nInstall the latest version with\n\n```\n$ composer require olive-cms/router\n```\n\nIf you do not use Composer, you can download composered zip from [release Github page](https://github.com/OliveCMS/Router/releases/latest)\n\n## Basic Usage\n\n``` php\nrequire_once 'vendor/autoload.php';\nuse Olive\\Router;\n\n$router = new Router();\n$router-\u003eaddHost('https://arshen.ir/', 1);\n$router-\u003eaddHost('https://blog.arshen.ir/', 2);\n\n// global route\n$router-\u003eadd('/api', function(){\n  return 'api area!';\n});\n\n// host 1 (https://arshen.ir/) route\n$router-\u003eadd('/login', function(){\n  return 'login area! only use in https://arshen.ir/';\n}, [], 1);\n\n// not found route\n$router-\u003eaddNotFound('not found');\n\n// render address\necho $router-\u003erender('https://arshen.ir/login');\n```\n\n## Documentation\n\n- [Usage Instructions](doc/01-usage.md)\n\n## Requirements\n\n- PHP 5.5+.\n\n## License\n\nolive-cms/router is licensed under the [MIT license](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivecms%2Frouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivecms%2Frouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivecms%2Frouter/lists"}