Firstly you need to go to the root directory of your application and run:
$ sudo composer require intervention/image
this will download all the necessary dependencies that you need. Then open your Laravel config file
config/app.php and add the following lines.
$providers array add the service providers for this package.
Add the facade of this package to the
‘Image’ => Intervention\Image\Facades\Image::class
Now the Image Class will be auto-loaded by Laravel.
Publish configuration in Laravel 5
php artisan vendor:publish –provider=”Intervention\Image\ImageServiceProviderLaravel5″
you can check here for more info
INSTALLING WORDPRESS ON UBUNTU OPERATING SYSTEM