plutuss/amember-pro-laravel
Composer 安装命令:
composer require plutuss/amember-pro-laravel
包简介
aMember allows you to receive and send information about users, products and payments
README 文档
README
Laravel:
composer require plutuss/amember-pro-laravel
php artisan vendor:publish --provider="Plutuss\AMember\Providers\AMemberServiceProvider"
.env
AMEMBER_URL=http://g00dsdw5vib.amdemo.com/api AMEMBER_API_KEY=F1dbbZd3453sdfneqdsfhw
#default collection #collection|array|json AMEMBER_TYPE_RESPONSE=collection
Use Facade AMember
- auth()
- invoice()
- payment()
- users()
- products()
- refunds()
- forms()
- access()
- affiliate()
<?php class AMemberController extends Controller { public function index() { \Plutuss\AMember\Facades\AMember::users()->getUsers(); } public function invoice_all() { \Plutuss\AMember\Facades\AMember::invoice()->getInvoice(); } public function invoice_by_id() { \Plutuss\AMember\Facades\AMember::invoice()->getInvoice(8); } public function auth() { \Plutuss\AMember\Facades\AMember::auth()->byLoginPass( login: 'admin', pass: '12341234' ); } public function store() { \Plutuss\AMember\Facades\AMember::users()->addUsers( login: 'admin', pass: '12341234', email: 'admin@admin.com', params: [ 'name_f' => 'John', 'name_l' => 'Smith', ... ] ); } public function update() { \Plutuss\AMember\Facades\AMember::users() ->updateUser( id: 8, fieldsAndValue: [ 'email' => 'max@admin.com', 'name_f' => 'Max', 'name_l' => 'Smith', ] ); } }
Parameters
You can pass additional parameters to control output: Docs
| Method | Description |
|---|---|
| format() | Either: json (default), xml or serialize |
| count() | Number of records per page (default: 20, max: 1000) |
| page() | Page of output (default: 0 - the first page) |
| sort() | Sort records based on a specified field |
| order() | Sort direction. Either asc (default) or desc |
| filter() | Adds a WHERE condition for FIELDNAME. |
| If search value contains % - it is considered as pattern for SQL LIKE expression, else SQL scondition is used. | |
| If multiple filters are provided, it will be concatenated into an SQL AND expression. | |
| nested() | Requests to include nested records into dataset. nested[]=invoices&nested[]=access |
| It will add user's invoices and access records into output. List of available nested tables is unique to each record type. |
<?php public function index() { \Plutuss\AMember\Facades\AMember::users()->count(12)->page(2)->getUsers(); }
It is also possible to make a custom query
<?php public function index() { (new AMemberClient())->setOption('/users') ->format('json') ->filter(['user_id' => 1]) ->count(12) ->sendGet(); // Or you can AMemberClient::getInstance() ->setOption('/users') ->format('json') ->filter(['user_id' => 1]) ->count(12) ->sendGet(); } public function auth() { (new AMemberClient())->setOption('/check-access/by-login-pass', [ 'login' => 'admin', 'pass' => '12341234', ])->sendPost(); // Or you can AMemberClient::getInstance() ->setOption('/check-access/by-login-pass', [ 'login' => 'admin', 'pass' => '12341234', ])->sendPost(); }
plutuss/amember-pro-laravel 适用场景与选型建议
plutuss/amember-pro-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 422 次下载、GitHub Stars 达 4, 最近一次更新时间为 2024 年 04 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「AMember」 「AMember Pro」 「AMember REST API」 「AMember Admin」 「AMember dashboard」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 plutuss/amember-pro-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 plutuss/amember-pro-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 plutuss/amember-pro-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
Rich payment solutions for Yii framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
A modern maintained install helper for Gravity Forms
Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
An install helper for Advanced Custom Fields PRO
Laravel package for interacting with CoinMarketCap API
统计信息
- 总下载量: 422
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-16