nstack / laravel-sdk
Laravel SDK for NStack
Installs: 1 191
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 1
Open Issues: 4
Requires
- php: ^7.1
- illuminate/translation: 5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0
- nstack/php-sdk: 1.0.*
Requires (Dev)
- mockery/mockery: dev-master
- orchestra/testbench: ~3.4
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2025-03-19 16:48:00 UTC
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