在 Intervention Image 的网站上,它说要安装最新版本,我必须运行以下命令:
php composer.phar require intervention/image
我正在使用 Windows 8.1,我想这不起作用。我已经尝试过了,它说:无法打开输入文件:composer.phar
我错过了一些很容易的事情吗?
在 Intervention Image 的网站上,它说要安装最新版本,我必须运行以下命令:
php composer.phar require intervention/image
我正在使用 Windows 8.1,我想这不起作用。我已经尝试过了,它说:无法打开输入文件:composer.phar
我错过了一些很容易的事情吗?
使用此命令
composer require intervention/image
正如 Sinan Bolel 提到的,在 Windows 中,输入“composer”而不是“php composer.phar”,然后......
首先你指向你的项目目录,然后你应该运行“composer require intervention/image””命令。
你这样的结果
Admin@Admin-dell MINGW64 /c/xampp/htdocs/laravel_dev
$ composer require intervention/image
Using version ^2.3 for intervention/image
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing psr/http-message (1.0)
Loading from cache
- Installing guzzlehttp/psr7 (1.3.0)
Loading from cache
- Installing intervention/image (2.3.7)
Downloading: 100%
intervention/image suggests installing ext-imagick (to use Imagick based image processing.)
intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
Admin@Admin-dell MINGW64 /c/xampp/htdocs/laravel_dev
为了使用composer,您首先需要安装它。
https://getcomposer.org/doc/00-intro.md#installation-windows
composer require intervention/image
并在config/app.php
return [
...
$provides => [
...
Intervention\Image\ImageServiceProvider::class
],
$aliases => [
...
'Image' => Intervention\Image\Facades\Image::class
]
]