如何在laravel 4.2中正确配置Imagine

时间:2015-10-05 09:33:14

标签: php laravel laravel-4

我在laravel中有一个要求,我需要使用laravel包 Imagine 进行一些服务器端裁剪,现在我按照我的应用程序的此软件包的安装说明,I.E。 :

我在{ "require": { "orchestra/imagine": "~3.0" } } 文件中添加了以下行:

composer.json

我的{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "require": { "laravel/framework": "4.2.*", "intervention/image": "dev-master", "orchestra/imagine": "~3.0" }, "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" } 文件现在如下所示:

composer update

现在,当我从终端运行config/app.php时,我收到以下消息:

Message

我现在也跟着 THESE INSTRUCTIONS ,将别名等添加到Class 'Orchestra\Imagine\ImagineServiceProvider' not found

现在,当我尝试加载管理面板时,出现以下错误:

dragLayer

为什么我会收到此错误,有人可以解释一下吗?

1 个答案:

答案 0 :(得分:2)

你正在使用laravel 4.2。*并用它来想象“~3.0”。想象“~3.0”适用于laravel 5.1。所以尝试使用正确的版本。下面的版本兼容性图片

enter image description here