是否可以在框架中包含一个不是专门为L4设计的软件包?如果是这样,它是如何完成的?我知道我需要将包添加到我将composer.json其添加到vendor文件夹中,但是我可以在providers数组中以某种方式注册它吗?还有其他必要步骤吗?
我想使用最初为Yii设计的Google结帐包
我想在m routes.php文件中使用Mobile Detect.我在composer.json中添加了包作为require,并将其安装在供应商文件中.我现在该怎么用?
我尝试了这个答案并且没有运气,因为没有找到类:Laravel 4使用供应商类
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
"mobiledetect/mobiledetectlib": "*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
Run Code Online (Sandbox Code Playgroud)
编辑:我尝试使用这个:https://github.com/jenssegers/Laravel-Agent,但别名从来没有说过没有找到类.