{"id":21522500,"url":"https://github.com/teddyoweh/routes-plugin-php","last_synced_at":"2025-04-09T22:32:41.275Z","repository":{"id":37738769,"uuid":"489852963","full_name":"teddyoweh/Routes-Plugin-PHP","owner":"teddyoweh","description":"This plugin can be embedded in PHP application to give the web application specific routes/href ","archived":false,"fork":false,"pushed_at":"2022-05-16T10:41:34.000Z","size":7605,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T00:26:24.159Z","etag":null,"topics":["php","php-routes","plugin","routes"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/teddyoweh.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}},"created_at":"2022-05-08T05:18:06.000Z","updated_at":"2023-08-29T21:14:00.000Z","dependencies_parsed_at":"2022-08-24T16:00:45.666Z","dependency_job_id":null,"html_url":"https://github.com/teddyoweh/Routes-Plugin-PHP","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/teddyoweh%2FRoutes-Plugin-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2FRoutes-Plugin-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2FRoutes-Plugin-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2FRoutes-Plugin-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teddyoweh","download_url":"https://codeload.github.com/teddyoweh/Routes-Plugin-PHP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123864,"owners_count":21051543,"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-routes","plugin","routes"],"created_at":"2024-11-24T01:10:45.686Z","updated_at":"2025-04-09T22:32:41.241Z","avatar_url":"https://github.com/teddyoweh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Routes Plugin PHP\nThis plugin can be embedded in PHP application to give the web application specific routes/href location and for entering specific/locations for each page in a web application\n\n# Usage\n\n## Startup\n```PHP\n\u003c?php\nrequire('./controller/routes/routes.php');\n$route = new Route(); \n```\n## Stylesheets and scripts\n```PHP\n$route-\u003eaddscripts('script.js');\n$route-\u003eaddstylesheets('style.scss');\n``` \n \n## Routings\n```PHP\n// Basic Pages\n$route-\u003ehomepage('home.php'); // Adding Home Page\n$route-\u003eerror404('error404.php'); // Adding 404 Error Page\n\n// Other Pages\n$route-\u003eadd('/users','users.php');\n$route-\u003eadd('/register','reg.php');\n$route-\u003einit(); // Starting the routing\n\n?\u003e\n\n```\n## Pages\nAll the pages are located in ``` ./controller/pages```\n\n## Scripts\nAll the scripts are located in ``` ./controller/scripts/```\n\n## Stylesheets\nAll the pages are located in ``` ./controller/styles/```\n\n## Extracomponents\n- [Bootstrap](https://getbootstrap.com/)\n- [Boxicon](https://boxicons.com/)\n- [Jquery](https://jquery.com/)\n- [FontAwesome-Icons](https://fontawesome.com/)\n- [PyScript](https://pyscript.net/)\n\nThere are two args when loading the extracomponents:\n- ```local``` Located in the Local Computer\n- ```web``` Sourced directly from the web\n```PHP\n\u003c?php\n\n$route-\u003eloadbootstrap('local');\n$route-\u003eloadpyscripts('local');\n$route-\u003eloadfontawesome('web');\n\n```\n# Installation\n```sh\ngit clone https://github.com/teddyoweh/Routes-Plugin-PHP.git\n```\n```sh\ncd Routes-Plugin-PHP\n```\n### Testing\n```PHP\n\u003c?php\nrequire('./controller/routes/routes.php');\n$route = new Route(); \n\n// Stylesheets and scripts\n$route-\u003eaddscripts('script.js');\n$route-\u003eaddstylesheets('style.scss');\n$route-\u003eloadbootstrap('local');\n$route-\u003eloadpyscripts('local');\n$route-\u003eloadfontawesome('web');\n$route-\u003eloadjquery('local');\n\n// Routings\n\n// Basic Pages\n$route-\u003ehomepage('home.php'); // Adding Home Page\n$route-\u003eerror404('error404.php'); // Adding 404 Error Page\n\n// Other Pages\n$route-\u003eadd('/users','users.php');\n$route-\u003eadd('/register','reg.php');\n$route-\u003einit(); // Starting the routing\n\n\n\n?\u003e\n \n```\n#### Starting Test Server\n```sh\nphp -S localhost:8000\n```\n### Moving Plugin\n```sh\n cp routes.php /new_directory\n```\nLicense\n----\n\nMIT License\n\nCopyright (c) 2021 Teddy Oweh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\nHire me: `teddyoweh`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddyoweh%2Froutes-plugin-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteddyoweh%2Froutes-plugin-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddyoweh%2Froutes-plugin-php/lists"}