jn-jairo / laravel-ngrok
使用 ngrok 分享 Laravel 应用。
v3.0.2
2024-03-14 23:34 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^6.5.8|^7.4.5
- illuminate/console: ^8.83|^9.0|^10.0|^11.0
- illuminate/http: ^8.83|^9.0|^10.0|^11.0
- illuminate/pagination: ^8.83|^9.0|^10.0|^11.0
- illuminate/routing: ^8.83|^9.0|^10.0|^11.0
- illuminate/support: ^8.83|^9.0|^10.0|^11.0
- symfony/process: ^5.4|^6.0|^7.0
Requires (Dev)
- orchestra/testbench: ^6.24|^7.0|^8.0|^9.0
- pestphp/pest: ^1.22|^2.34
- phpspec/prophecy: ^1.17
- phpspec/prophecy-phpunit: ^2.0
- webmozart/assert: ^1.11
README
使用 ngrok 分享 Laravel 应用
本扩展包允许您通过 ngrok 分享您的 Laravel 应用。
要求
- Ngrok >= 2.2.8 (如果您使用 Laravel Homestead,则此软件可能已安装)
版本兼容性
安装
您可以通过 composer 安装此包。
composer require --dev jn-jairo/laravel-ngrok
NgrokServiceProvider
将自动为您注册。
使用方法
只需调用 artisan 命令以启动 ngrok。
php artisan ngrok
ngrok 的参数将从您的应用程序中提取。
高级使用
php artisan ngrok [options] [--] [<host-header>]
示例
# If you have multiples apps (myapp.test, my-other-app.test, ...) # set it in the app.url configuration # or pass it in the host-header argument php artisan ngrok myapp.test # If you use a different port, set it in the app.url configuration # or pass it in the --port option php artisan ngrok --port=8000 myapp.test # If you use docker and have containers like (nginx, php, workspace) # and wanna run the command inside the workspace container # pass the name of the container the requests will tunnel through php artisan ngrok --host=nginx example.com # If you wanna pass other arguments directly to ngrok # use the --extra or -E option php artisan ngrok --extra='--region=eu' -E'--config=ngrok.yml'
许可证
MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件。