{"id":18000083,"url":"https://github.com/liyu001989/laravel-api-starter","last_synced_at":"2025-08-21T02:04:38.989Z","repository":{"id":85942035,"uuid":"95127265","full_name":"liyu001989/laravel-api-starter","owner":"liyu001989","description":"laravel5.5 + dingo/api + JWT","archived":false,"fork":false,"pushed_at":"2022-09-03T01:46:20.000Z","size":321,"stargazers_count":84,"open_issues_count":1,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-21T02:02:33.014Z","etag":null,"topics":["dingo-api","jwt","laravel","rest-api"],"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/liyu001989.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-22T14:59:31.000Z","updated_at":"2025-04-16T12:21:35.000Z","dependencies_parsed_at":"2023-03-13T07:34:48.367Z","dependency_job_id":null,"html_url":"https://github.com/liyu001989/laravel-api-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liyu001989/laravel-api-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyu001989%2Flaravel-api-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyu001989%2Flaravel-api-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyu001989%2Flaravel-api-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyu001989%2Flaravel-api-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liyu001989","download_url":"https://codeload.github.com/liyu001989/laravel-api-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyu001989%2Flaravel-api-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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-21T02:00:08.990Z","response_time":74,"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":["dingo-api","jwt","laravel","rest-api"],"created_at":"2024-10-29T22:16:20.765Z","updated_at":"2025-08-21T02:04:38.949Z","avatar_url":"https://github.com/liyu001989.png","language":"PHP","funding_links":["https://paypal.me/liyu001989"],"categories":[],"sub_categories":[],"readme":"# laravel-api-starter\n\n这是一个 Laravel 5.5 + Dingo + JWT 的基础项目, 用于快速开始写 API\n\n[![StyleCI](https://styleci.io/repos/95127265/shield)](https://styleci.io/repos/95127265)\n[![License](https://img.shields.io/github/license/liyu001989/laravel-api-starter.svg)](LICENSE)\n[![donate](https://img.shields.io/badge/paypal-donate-red.svg)](https://paypal.me/liyu001989)\n[![donate](https://img.shields.io/badge/%E7%BA%A2%E5%8C%85-donate-red.svg)](https://cloud.githubusercontent.com/assets/2981799/25706351/cfba493c-3112-11e7-9985-aec05ff9734c.png)\n\n\n- Laravel/RESTful 交流群: 216721539\n\n## USEFUL LINK\n\n读文档很重要，请先仔细读读文档 laravel, dingo/api，jwt，fractal 的文档。\n\n- dingo/api [https://github.com/dingo/api](https://github.com/dingo/api)\n- dingo api 中文文档 [dingo-api-wiki-zh](https://github.com/liyu001989/dingo-api-wiki-zh)\n- jwt(json-web-token) [https://github.com/tymondesigns/jwt-auth](https://github.com/tymondesigns/jwt-auth)\n- transformer [fractal](http://fractal.thephpleague.com/)\n- apidoc 生成在线文档 [apidocjs](http://apidocjs.com/)\n- rest api 参考规范 [jsonapi.org](http://jsonapi.org/format/)\n- api 调试工具 [postman](https://www.getpostman.com/)\n- 有用的文章 [http://oomusou.io/laravel/laravel-architecture](http://oomusou.io/laravel/laravel-architecture/)\n- php lint [phplint](https://github.com/overtrue/phplint)\n- Laravel 理念 [From Apprentice To Artisan](https://my.oschina.net/zgldh/blog/389246)\n- 我对 REST 的理解 [http://blog.lyyw.info/2017/02/09/2017-02-09%20%E5%AF%B9rest%E7%9A%84%E7%90%86%E8%A7%A3/](http://blog.lyyw.info/2017/02/09/2017-02-09%20%E5%AF%B9rest%E7%9A%84%E7%90%86%E8%A7%A3/)\n\n## USAGE\n\n```\n$ git clone git@github.com:liyu001989/laravel-api-starter.git\n$ composer install\n$ 设置 `storage` 目录必须让服务器有写入权限。\n$ cp .env.example .env\n$ vim .env\n    DB_*\n        填写数据库相关配置 your database configuration\n    APP_KEY\n        php artisan key:generate\n    JWT_SECRET\n        php artisan jwt:secret\n\n$ php artisan migrate\n$ php artisan db:seed (默认添加了10个用户)\n\n头信息中可以增加 Accept:application/vnd.app.v1+json 切换v1和v2版本\n```\n\n如果访问一直不对，可以进入public 目录执行 `php -S localhost:8000 -t public`，然后尝试调用几个接口，从而确定是否为web服务器的配置问题。\n\n## 相关说明\n\n- 通过一个中间件 [https://github.com/liyu001989/dingo-serializer-switch](https://github.com/liyu001989/dingo-serializer-switch) 切换 fractal 的 serializer, 默认使用 array。\n- 让 findOrFail 返回 404, 更方便使用\n- 可以用过 `Accept-Language` 头来却换语言，比如 zh-CN, 当然也可以默认中文 \n\n## License\n\n[MIT license](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliyu001989%2Flaravel-api-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliyu001989%2Flaravel-api-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliyu001989%2Flaravel-api-starter/lists"}