{"id":17342791,"url":"https://github.com/inambe/php-rest-api","last_synced_at":"2025-03-27T09:19:13.011Z","repository":{"id":182877416,"uuid":"128547615","full_name":"Inambe/php-rest-api","owner":"Inambe","description":"Simple Slim-PHP Rest API","archived":false,"fork":false,"pushed_at":"2018-04-19T02:04:26.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T14:16:59.255Z","etag":null,"topics":["api","authentication","php","slim","token"],"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/Inambe.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}},"created_at":"2018-04-07T16:35:27.000Z","updated_at":"2018-04-19T02:04:27.000Z","dependencies_parsed_at":"2023-07-22T00:46:30.382Z","dependency_job_id":null,"html_url":"https://github.com/Inambe/php-rest-api","commit_stats":null,"previous_names":["inambe/php-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inambe%2Fphp-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inambe%2Fphp-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inambe%2Fphp-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inambe%2Fphp-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inambe","download_url":"https://codeload.github.com/Inambe/php-rest-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245814747,"owners_count":20676808,"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":["api","authentication","php","slim","token"],"created_at":"2024-10-15T16:07:03.760Z","updated_at":"2025-03-27T09:19:12.984Z","avatar_url":"https://github.com/Inambe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Rest API\n\nThis template puts three PHP libraries together for producing simple yet powerful/useful APIs\n\n## Installation\n\nDownload as zip and extract (Rename the folder as you required)\n\ncd into folder:\n\n```\ncd yourfolder\n```\n\nupdate dependencies\n\n```\ncomposer update\n```\n\nOnce installation is finished, Go to ``` localhost/yourfolder/ ``` you will see:\n\n```\n{\n  \"msg\": \"Hello World!\"\n}\n```\n\n## Basic Usage\nFor creating routes as your requirement, You need to create file for every route group in ``` routes/ ``` folder\n(DON'T Forget to add ```__``` prefix to file names).\nFor example, if you are creating API for Managing books table into your database, your route file name should be like ```__books.php```. In this file you'll have all the routes for managing books table into your database.\nInstead of creating seprate files for every group of routes, You can put all routes into a single file (It's bad).\nRead more about routing in [Slim Docs](https://www.slimframework.com/docs/)\n\n## Interacting with Database\n\nYou need to change ```using_db``` option to ```true ``` in ```config/app.php``` and also add your database credentials there.\nYou can then access Medoo database object in your route's callback function like this ``` $this-\u003edb ... ```.\nRead more about [Medoo](https://medoo.in/doc) (It's Super Simple)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finambe%2Fphp-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finambe%2Fphp-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finambe%2Fphp-rest-api/lists"}