定制 usamamuneerchaudhary/laravel-api-boilerplate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

usamamuneerchaudhary/laravel-api-boilerplate

Composer 安装命令:

composer create-project usamamuneerchaudhary/laravel-api-boilerplate

包简介

Simple Laravel API Boilerplate to create a ready-to-use REST API using Laravel Passport

README 文档

README

Laravel API Boilerplate using Laravel Passport

Laravel API Boilerplate is a starting point for your first API.

It is built on top of:

Installation

  1. run composer create-project usamamuneerchaudhary/laravel-api-boilerplate myfirstApi;

  2. Rename .env.example to .env

  3. Generate Passport encryption keys & secret access tokens php artisan passport:install

  4. Generate application key by php artisan key:generate

  5. After DB Connection, run php artisan migrate. For dummy data for users, run php artisan migrate --seed. You can see more info in database\seeds\UserTableSeeder.php.

  6. For Testing Emails, you can setup MailTrap.

  7. Well that's it lad, it would be up and running on your server already.

Basic Requirements for the Project

  1. PHP v7.3 or greater.

Main Features

Ready-To-Use Authentication Controllers

You can find Authentication Controllers under namespace App\Http\Controllers\API\Auth.

Validations

There are also the validation rules for every action (login, sign up, recovery and reset) under namespace App\Http \Request\API\Auth.

Endpoints

  • Login: POST api/v1/login
  • Register: POST api/v1/register
  • Recover POST api/v1/recover
  • Reset POST api/v1/reset
  • Find Reset Token GET api/v1/reset/{token}
  • Logout GET api/v1/logout
  • Verify Email api/v1/user/verify/email/{token}

Please note that, api routes are prefixed with v1, you can changed this in App\Providers\RouteServiceProvider.php

Separate File for Routes

All the API routes can be found in the routes/api.php file.

Firewall

We're using akaunting/firewall to secure our API.

Roles & Permissions

Simpler way of assigning Roles & Permissions to Users. You can more details on what we've done here on usamamuneerchaudhary/roles-permissions

CRUD Scaffolding

A Simple CRUD Scaffolding package is being setup out of the box to keep you going without any hassle.

Creating Endpoints

You can create your endpoints in routes/api.php under auth:api middleware group.

Cross Origin Resource Sharing

If you want to enable CORS for a specific route or routes group, you just have to use the cors middleware on them.

Thanks to the barryvdh/laravel-cors package, you can handle CORS easily. Just check the docs at this page for more info.

License

This project is open-sourced software licensed under the MIT license.

usamamuneerchaudhary/laravel-api-boilerplate 适用场景与选型建议

usamamuneerchaudhary/laravel-api-boilerplate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 7, 最近一次更新时间为 2020 年 03 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「api」 「boilerplate」 「laravel」 「passport」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 usamamuneerchaudhary/laravel-api-boilerplate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 usamamuneerchaudhary/laravel-api-boilerplate 我们能提供哪些服务?
定制开发 / 二次开发

基于 usamamuneerchaudhary/laravel-api-boilerplate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-28