nodes / nstack
此包已被放弃且不再维护。没有建议的替代包。
为Laravel使用NStack的简单方式
1.1.2
2018-07-06 06:46 UTC
Requires
- guzzlehttp/guzzle: 6.x
- laravel/framework: 5.1.*||5.2.*||5.3.*||5.4.*||5.5.*
- nodes/core: ^1.0
Requires (Dev)
- orchestra/testbench: ~3.4
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2024-05-17 19:33:04 UTC
README
Laravel的NStack集成
📝 简介
📦 安装
要安装此包,您需要
- Laravel 5.1+
- PHP 7.0+
然后您必须修改您的composer.json
文件并运行composer update
以将包的最新版本包含到您的项目中。
"require": {
"nodes/nstack": "1.0.*",
}
或者您可以从终端运行composer require命令。
composer require nodes/nstack
🔧 设置
在config/app.php中设置服务提供者
Nodes\NStack\ServiceProvider::class,
Nodes\ServiceProvider::class,
在config/app.php中设置别名
'NStack' => Nodes\Backend\Support\Facades\NStack::class,
发布配置文件
php artisan vendor:publish && php artisan vendor:publish --provider="Nodes\NStack\ServiceProvider" --force
导出
composer dump-autoload
⚙ 使用
全局函数
nstack()
$countries = nstack()->countries()
nstack()->pushLog('fcm', 'my-app', 'userNotification', true, ['request here'], ['response here'], 'Hi!', 1);
nstack()->fileUpload('private-password', $uploadedFile, str_random(8));
nstack()->validateEmail($email): bool
🏆 致谢
此包由Nodes的PHP团队开发和维护
📄 许可证
此包是开源软件,受MIT许可协议许可