{"id":22108868,"url":"https://github.com/theadnan/yii1-api-controller","last_synced_at":"2026-04-29T09:06:54.266Z","repository":{"id":79678458,"uuid":"106403282","full_name":"TheAdnan/Yii1-API-controller","owner":"TheAdnan","description":"Template for API controller in Yii","archived":false,"fork":false,"pushed_at":"2017-10-10T11:19:38.000Z","size":4,"stargazers_count":1,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T18:48:12.423Z","etag":null,"topics":["api","api-rest","php","php-api","yii","yii1","yii2"],"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/TheAdnan.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-10-10T10:35:10.000Z","updated_at":"2021-10-12T09:35:16.000Z","dependencies_parsed_at":"2023-05-14T12:00:17.335Z","dependency_job_id":null,"html_url":"https://github.com/TheAdnan/Yii1-API-controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheAdnan/Yii1-API-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAdnan%2FYii1-API-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAdnan%2FYii1-API-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAdnan%2FYii1-API-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAdnan%2FYii1-API-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheAdnan","download_url":"https://codeload.github.com/TheAdnan/Yii1-API-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAdnan%2FYii1-API-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32418236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","api-rest","php","php-api","yii","yii1","yii2"],"created_at":"2024-12-01T09:20:45.442Z","updated_at":"2026-04-29T09:06:54.247Z","avatar_url":"https://github.com/TheAdnan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii1 REST API controller\n_Template for REST API controller in Yii 1_\n\n## Usage\n\n* Add the *ApiController.php* file to your controllers folder\n* Change the `APPLICATION_ID`, and add your models in each action in the switch-case statement (_remove the MyModel example before that_)\n* Open the *protected/config/main.php* file and add this to your configuration:\n```\n'urlManager' =\u003e array(\n            'urlFormat' =\u003e 'path',\n            'showScriptName' =\u003e false,\n            'caseSensitive' =\u003e true,\n            'rules' =\u003e array(\n                //API rules\n                array('api/list', 'pattern'=\u003e'api/\u003cmodel\u003e', 'verb'=\u003e'GET'),\n                array('api/view', 'pattern'=\u003e'api/\u003cmodel\u003e/\u003cid:\\d+\u003e', 'verb'=\u003e'GET'),\n                array('api/update', 'pattern'=\u003e'api/\u003cmodel\u003e/\u003cid:\\d+\u003e', 'verb'=\u003e'PUT'),\n                array('api/delete', 'pattern'=\u003e'api/\u003cmodel\u003e/\u003cid:\\d+\u003e', 'verb'=\u003e'DELETE'),\n                array('api/create', 'pattern'=\u003e'api/\u003cmodel\u003e', 'verb'=\u003e'POST'),\n            ),\n        ), \n ```      \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheadnan%2Fyii1-api-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheadnan%2Fyii1-api-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheadnan%2Fyii1-api-controller/lists"}