# laravel-api **Repository Path**: techutter/laravel-api ## Basic Information - **Project Name**: laravel-api - **Description**: 自用,喜欢你就star一个再拿走。 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-12-21 - **Last Updated**: 2024-12-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # larvael-api # 介绍 现在前后端分离越来越盛,写api的一直找不到一个合适的api框架,索性自己整理一个, 基本功能差不多都有,主要自用混个一周工期。后续一直ctrl+c、ctrl+v就完事了。 #特色 1. 解决跨域问题 2. 统一Response响应处理 3. Api-Resource资源返回 4. jwt用户认证 5. Api输出sql打印 6. 代码提示工具 7. 简单的中间件控制 8. ... # 环境 php PHP >= 7.3 Laravel 8.0 ~ 9.* # 安装教程 推荐使用homestead 做为开发环境,使用Sail或宿主机做为开发环境需要自己解决环境存在的问题。 当然你开心最好 1. git clone https://gitee.com/private.com/laravel-api.git ####安装依赖 ```shell composer install ``` #### 创建指定数据库 ```shell sh ./bin/install.sh ``` #### 使用说明 windows 可能存在文件格式问题 ```shell vim ./bin/refresh.sh ``` 在vim中输入`!` 运行命令 ```shell set ff=unix ``` #####开发时经常重置数据 ```shell ./bin/refresh.sh ``` #####伪静态 ```shell location / { try_files $uri $uri/ /index.php?$query_string; } ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 异常处理 1、composer 报错 Your requirements could not be resolved to an installable set of packages. ```shell composer install --ignore-platform-reqs 或者 composer update --ignore-platform-reqs ```