3

In Intervention Image's website, it says that in order to install the most recent version, I must run the following command :

php composer.phar require intervention/image

I am using Windows 8.1 and I guess this isn't going to work. I already tried and it says : Could not open input file: composer.phar

Am I missing something very easy?

user3038607
  • 411
  • 3
  • 7
  • 18
  • 2
    [This answer](http://stackoverflow.com/a/22586674/1526037) may help. Also, see the answers for [this question](http://stackoverflow.com/q/27813693/1526037) - possible a duplicate. – sbolel May 20 '15 at 23:29
  • 2
    Thank you!! Instead of doing php composer.phar I just have to write composer! – user3038607 May 20 '15 at 23:30
  • You're welcome. Please don't forget to give the author of the original answer some credit, and to accept your own answer :) – sbolel May 20 '15 at 23:32
  • possible duplicate of [Could not open input file: composer.phar error in symfony2 using wamp](http://stackoverflow.com/questions/21670709/could-not-open-input-file-composer-phar-error-in-symfony2-using-wamp) – sbolel May 20 '15 at 23:33

5 Answers5

14

Use this command

composer require intervention/image
Zoe
  • 27,060
  • 21
  • 118
  • 148
Hailemariam
  • 140
  • 1
  • 4
6

As Sinan Bolel mentionned, in windows, instead of "php composer.phar" you type "composer" and the following...

user3038607
  • 411
  • 3
  • 7
  • 18
3

First of all you point you project directory after that you should run "composer require intervention/image""command.

Your result like this

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
Flows
  • 3,675
  • 3
  • 28
  • 52
0

In order to use composer, you first need to install it.

https://getcomposer.org/doc/00-intro.md#installation-windows

castis
  • 8,154
  • 4
  • 41
  • 63
0
composer require intervention/image

and in config/app.php

return [
    ...
    $provides => [
        ...
        Intervention\Image\ImageServiceProvider::class
    ],
    $aliases => [
        ...
        'Image' => Intervention\Image\Facades\Image::class
    ]
]
sɐunıɔןɐqɐp
  • 3,332
  • 15
  • 36
  • 40