mirror of
https://github.com/Intervention/image.git
synced 2025-08-26 15:24:37 +02:00
Laravel 5 compatibility
This commit is contained in:
@@ -43,7 +43,7 @@ class ImageServiceProvider extends ServiceProvider
|
|||||||
$app = $this->app;
|
$app = $this->app;
|
||||||
$version = intval($app::VERSION);
|
$version = intval($app::VERSION);
|
||||||
$provider = sprintf(
|
$provider = sprintf(
|
||||||
'\Intervention\Image\Providers\Laravel%dServiceProvider', $version
|
'\Intervention\Image\ImageServiceProviderLaravel%d', $version
|
||||||
);
|
);
|
||||||
|
|
||||||
return new $provider($app);
|
return new $provider($app);
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Intervention\Image\Providers;
|
namespace Intervention\Image;
|
||||||
|
|
||||||
use Intervention\Image\ImageManager;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Http\Response as IlluminateResponse;
|
use Illuminate\Http\Response as IlluminateResponse;
|
||||||
|
|
@@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Intervention\Image\Providers;
|
namespace Intervention\Image;
|
||||||
|
|
||||||
use Intervention\Image\ImageManager;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Http\Response as IlluminateResponse;
|
use Illuminate\Http\Response as IlluminateResponse;
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ class Laravel5ServiceProvider extends ServiceProvider
|
|||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
$this->publishes(array(
|
$this->publishes(array(
|
||||||
__DIR__.'/../../../config/config.php' => config_path('image.php')
|
__DIR__.'/../../config/config.php' => config_path('image.php')
|
||||||
));
|
));
|
||||||
|
|
||||||
// setup intervention/imagecache if package is installed
|
// setup intervention/imagecache if package is installed
|
||||||
@@ -45,7 +44,7 @@ class Laravel5ServiceProvider extends ServiceProvider
|
|||||||
// merge default config
|
// merge default config
|
||||||
$this->mergeConfigFrom(
|
$this->mergeConfigFrom(
|
||||||
'image',
|
'image',
|
||||||
__DIR__.'/../../../config/config.php'
|
__DIR__.'/../../config/config.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
// create image
|
// create image
|
||||||
@@ -62,7 +61,7 @@ class Laravel5ServiceProvider extends ServiceProvider
|
|||||||
private function bootstrapImageCache()
|
private function bootstrapImageCache()
|
||||||
{
|
{
|
||||||
$app = $this->app;
|
$app = $this->app;
|
||||||
$config = __DIR__.'/../../../../../imagecache/src/config/config.php';
|
$config = __DIR__.'/../../../../imagecache/src/config/config.php';
|
||||||
|
|
||||||
$this->publishes(array(
|
$this->publishes(array(
|
||||||
$config => config_path('imagecache.php')
|
$config => config_path('imagecache.php')
|
Reference in New Issue
Block a user