{"id":16750012,"url":"https://github.com/hakobyansen/php-routing-attributes-example","last_synced_at":"2025-03-16T04:20:09.846Z","repository":{"id":226879096,"uuid":"769807899","full_name":"hakobyansen/php-routing-attributes-example","owner":"hakobyansen","description":"An example app for DEV article","archived":false,"fork":false,"pushed_at":"2024-03-12T19:37:32.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T16:48:22.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/hakobyansen.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":"2024-03-10T05:34:55.000Z","updated_at":"2024-05-04T12:37:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec20391c-8193-4579-aee8-8f625ece7a89","html_url":"https://github.com/hakobyansen/php-routing-attributes-example","commit_stats":null,"previous_names":["hakobyansen/php-routing-attributes-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakobyansen%2Fphp-routing-attributes-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakobyansen%2Fphp-routing-attributes-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakobyansen%2Fphp-routing-attributes-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakobyansen%2Fphp-routing-attributes-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakobyansen","download_url":"https://codeload.github.com/hakobyansen/php-routing-attributes-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243823217,"owners_count":20353631,"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":[],"created_at":"2024-10-13T02:26:44.791Z","updated_at":"2025-03-16T04:20:09.824Z","avatar_url":"https://github.com/hakobyansen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is an example app for [DEV article](https://dev.to/hakobyansen/routing-implementation-using-php-attributes-n1l).\n\n\nCreate `.env` file in the root of the project with following single variable:\n\n```\nJSON_PLACEHOLDER_BASE_URL=https://jsonplaceholder.typicode.com\n```\n\nBuild, run and install composer dependencies:\n\n```shell\ndocker-compose up --build\n```\n\nInstall composer dependencies \n```shell\ndocker-compose run app composer install\n```\n\nOnce you are up and running, you can retrieve existing user by ID or create new user using `curl` or another HTTP client.\n\n```shell\n# retrieve user by ID\ncurl -X GET --location \"http://localhost:8080/users?id=10\" \n   -H \"Content-Type: application/json\" \n   -H \"Accept: application/json\"\n\n# create new user\ncurl -X POST --location \"http://localhost:8080/users\" \\\n    -H \"Content-Type: application/json\" \\\n    -d \"{\n          \\\"name\\\": \\\"John Smith\\\"\n        }\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakobyansen%2Fphp-routing-attributes-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakobyansen%2Fphp-routing-attributes-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakobyansen%2Fphp-routing-attributes-example/lists"}