Laravel Intervention Image Class - Class 'Image' not found

I'm trying to install intervention/image from composer, but after installation I get this error:

Class 'Image' not found

1: install via composer:

composer require intervention/image 

2: add to providers array:

'Intervention\Image\ImageServiceProvider' 

3: add to aliases array:

'Image' => 'Intervention\Image\Facades\Image'

4: update composer:

composer update

5: publish:

php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5" 

public result:

Nothing to publish for tag [].

6: autoload:

composer dump-autoload

Answers


  1. Copy file config.php in folder /vender/intervention/image/src/config/config.php to /config/ and rename config.php to image.php

  2. Update config

    php artisan config:cache


If you use the Image facade into a namespaced class, you should try this

// import class
use Image;

// then
Image::make('public/foo.jpg');

or

\Image::make('public/foo.jpg');

Need Your Help

Windows Vista/7 Kernel Hooking of Userland

winapi kernel hook driver windows-kernel

I'm looking for advice on implementing a driver under Vista and 7 which can hook and monitor arbitrary system functions for a userland process. My goal is to simply dump arguments for system funct...

Short-hand or Efficiency for the following code

javascript jquery case shorthand performance

This is my first question here on Stack Overflow. I generally find all my answers from searching but I'm completely out of motivation after writing the following code.