nstack/laravel-sdk
Composer 安装命令:
composer require nstack/laravel-sdk
包简介
Laravel SDK for NStack
README 文档
README
📝 Introduction
An API wrapper for nstack.io API
📦 Installation
To install this package you will need:
- PHP 7.1+
Run
composer require nstack/laravel-sdk
or setup in composer.json
nstack/laravel-sdk: 1.0.x
In config/app.php (Laravel) or bootstrap/app.php (Lumen) you should replace Laravel's translation service provider
Illuminate\Translation\TranslationServiceProvider::class,
by the one included in this package:
NStack\ServiceProvider::class
Setup in config/app.php
'providers' => [ .... // Illuminate\Translation\TranslationServiceProvider::class NStack\ServiceProvider::class ] 'aliases' => [ .... 'NStack' => NStack\Facade::class, ]
Copy config over from vendor/nstack/config/nstack.php to project/config/nstack.php
php artisan vendor:publish --provider="NStack\ServiceProvider"
⚙ Usage
You can now call via facade, eg:
\NStack::getContinentsClient()->index()
or via global function
nstack()->getContinentsClient()->index()
or via integration with trans() helper
echo trans('messages.welcome');
All the basic fuctionality can be found in the php-sdk
Features
[x] Register php-sdk in laravel provider, with Facade and global func
[x] Translate provider for localization using laravels global func: trans(key)
All PHP functionality can be found
🏆 Credits
This package is developed and maintained by the PHP team at Monstarlab
📄 License
This package is open-sourced software licensed under the MIT license
统计信息
- 总下载量: 1.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-04