dreadkopp/laravel_slim_transceiver
最新稳定版本:0.1.9
Composer 安装命令:
composer require dreadkopp/laravel_slim_transceiver
包简介
Stack laravel on top of your existing slim application
README 文档
README
This small helper allows you to run laravel on top of your existing Slim app.
Install
composer require dreadkopp/laravel_slim_transceiver
Usage
(i assume you already installed Laravel on top of your existing slim project)
Laravel-side:
add to the Bottom of your routes/web.php:
Route::fallback([\dreadkopp\LaravelSlimTransceiver\SlimTransceiver::class,'handle'])
->withoutMiddleware( \App\Http\Middleware\VerifyCsrfToken::class);
Slim:
in /public you should have a slim.php, we need to slightly modify that.
First, rename it to sub_slim.php
Second we need a slight adjustment. Last line in your sub_slim.php should read something like
$app->run();
change that to
return $app->run(true);
Third you want to disable the start of session in your slim app code since the Transceiver will create a temporary one for you during runtime
Global
Last, point your webserver to public/index.php instead of public/slim.php
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-03-10