irfa / app-license-client
"许可证/序列号用于Web应用程序"
v1.0
2020-11-23 11:59 UTC
Requires
- php: ^7.2
- ext-json: *
- ixudra/curl: >=6.0
- laravel/framework: ^6.0|^7.0
This package is auto-updated.
Last update: 2024-09-24 10:12:57 UTC
README
如果您安装了端点服务器的插件,则此插件将运行,请访问此处 https://github.com/irfaardy/app-license-server
此插件用于在客户端服务器上安装应用程序序列号
🛠️ 使用Composer安装
composer require irfa/app-license-client
您可以从这里获取Composer here
🛠️ Laravel设置
添加到config/app.php
'providers' => [
....
Irfa\AppLicenseClient\AppLicenseClientServiceProvider::class,
];
添加到config/app.php
'aliases' => [
....
'ALC' => Irfa\AppLicenseClient\Facades\AppLicenseClient::class,
],
发布供应商
php artisan vendor:publish --tag=app-license-client
配置文件
config/irfa/app-license-client.php
插件设置
在此文件.env中添加此行
将此行添加到文件.env中
APP_SERIAL_NUMBER=XXXX-XXXX-XXXX-XXXX APP_LICENSE_ENDPOINT=https://example.com/check/license
设置中间件
打开文件App\Http\Kernel.php
打开文件App\Http\Kernel.php
在$routeMiddleware中添加此项
在$routeMiddleware中添加此项
'licenseCheck' => \Irfa\AppLicenseClient\Middleware\AppLicenseChecker::class,
在路由中实现
Route::middleware('licenseCheck')->get('/example','TestController@index');