{"id":14974530,"url":"https://github.com/120dev/template-api","last_synced_at":"2026-02-08T13:33:12.628Z","repository":{"id":181454257,"uuid":"90584068","full_name":"120dev/template-api","owner":"120dev","description":"This project allows to create Posts, Categories via an interface API type","archived":false,"fork":false,"pushed_at":"2017-05-08T05:57:03.000Z","size":233,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T08:33:44.712Z","etag":null,"topics":["api","api-server","dingo","laravel54","unit-testing"],"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/120dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-05-08T03:47:53.000Z","updated_at":"2017-08-10T21:23:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c363949-6317-4894-8386-5b7270fe31d9","html_url":"https://github.com/120dev/template-api","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"6a6131771e86d7d7350ab0e4f3bdfd6a1a3ce690"},"previous_names":["120dev/template-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/120dev/template-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/120dev%2Ftemplate-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/120dev%2Ftemplate-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/120dev%2Ftemplate-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/120dev%2Ftemplate-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/120dev","download_url":"https://codeload.github.com/120dev/template-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/120dev%2Ftemplate-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268657447,"owners_count":24285506,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-server","dingo","laravel54","unit-testing"],"created_at":"2024-09-24T13:50:41.896Z","updated_at":"2026-02-08T13:33:12.599Z","avatar_url":"https://github.com/120dev.png","language":"PHP","readme":"Template-API\n===========\n\n## Requirements\n\n**This project allows to create posts, categories via an interface API type**\n\nThe following dependencies needs to be previously installed :\n* PHP 5.6\n* Laravel 5.4\n* Composer\n\n## Installation\n\n1. Clone this github repository on your local computer\n\n  ```bash\n  $ git clone https://github.com/120dev/template-api\n  ```\n\n2. Install dependencies\n\n  ```bash\n  $ composer install\n  ```\n\n3. Copy `.env.sample` to `.env` and change it's content according to your environment.\n\n  ```bash\n  $ cp .env.sample .env\n  ```\n\n4. Generate an application key\n\n  ```bash\n  $ php artisan key:generate\n  ```\n\n5. Create a databases (prod \u0026 testing) with the name used in `.env` (`DB_DATABASE`).\n\n6. Run the following command to create tables\n\n  ```bash\n  $ php artisan migrate\n  ```\n\n7. Invoke the `seeder` to insert some data\n\n  ```bash\n  $ php artisan db:seed\n  ```\n## Server\n  ```bash\n  $ php artisan serve\n  ```\n## Test\n\n```bash\n  $ phpunit\n```\n\n## Usage / Demo\n##### For : Create Read Update Delete on post\n\n#### POST `/`\n```curl\n$ curl -X POST \\\n    http://localhost:8000/api/posts/ \\\n    -H 'accept: application/vnd.templateApi.v1+json' \\\n    -H 'cache-control: no-cache' \\\n    -F title=test \\\n    -F body=body \\\n    -F active=1 \\\n    -F category_id=1\n```\n\n#### GET `/`\n```curl\n$ curl -X GET http://localhost:8000/api/posts/ \\\n        -H 'accept: application/vnd.templateApi.v1+json' \\\n        -H 'cache-control: no-cache'\n```\n\n#### GET `/id`\n```curl\n$ curl -X GET http://localhost:8000/api/posts/1 \\\n        -H 'accept: application/vnd.templateApi.v1+json' \\\n        -H 'cache-control: no-cache'\n```\n\n#### PATCH `/1`\n```curl\n$ curl -X PATCH \\\n      http://localhost:8000/api/posts/1 \\\n      -H 'accept: application/vnd.templateApi.v1+json' \\\n      -H 'cache-control: no-cache' \\\n      -H 'content-type: application/x-www-form-urlencoded' \\\n      -d 'title=title\u0026body=body\u0026category_id=1\u0026active=1'\n```\n\n#### DELETE `/1`\n```curl\n$ curl -X DELETE \\\n    http://localhost:8000/api/posts/1 \\\n    -H 'accept: application/vnd.templateApi.v1+json' \\\n    -H 'cache-control: no-cache'\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F120dev%2Ftemplate-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F120dev%2Ftemplate-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F120dev%2Ftemplate-api/lists"}