star-insure/crm-client
最新稳定版本:1.1.5
Composer 安装命令:
composer require star-insure/crm-client
包简介
Star Insure CRM Client
关键字:
README 文档
README
A package for Laravel apps that includes a wrapper for the Star Inure CRM and scaffolds out routes, controllers and middleware for authenticating with the Star auth app.
Installation
You can install the package via composer:
composer require star-insure/crm-client
Add these values to your .env file:
# CRM
CRM_API_URL=http://crm.test
CRM_API_TOKEN=dev
CRM_API_GROUP_ID=2
CRM_API_VERSION=v1
Publish config:
php artisan vendor:publish --tag=starinsure-crm
Usage
API
Call the Star CRM API by instantiating a new client, or using the StarInsure\Api\Facades\CrmApi facade.
CrmApi::get('/account-manager-brokers');
Helper functions
Create a helpers.php file within the app directory (or edit your existing one):
if (! function_exists('crm')) { /** * Global helper to create an instance of the StarCrm client. */ function crm() { return new \StarInsure\Crm\CrmApi( config('crm.version'), ); } }
Autoload your helpers file in composer.json:
"autoload": { ... "files": [ "app/helpers.php" ] },
After adding the helpers file to composer.json, you'll need to dump the autoloader
composer dump-autoload
You can now use the global helper functions and not worry about namespaces/imports.
crm()->get('/account-manager-brokers');
统计信息
- 总下载量: 70
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-02