mirror of
https://github.com/Intervention/image.git
synced 2025-08-12 17:03:59 +02:00
Added IoC container alias to enable automatic dependency injection
This commit is contained in:
@@ -96,5 +96,7 @@ class ImageServiceProviderLaravel4 extends ServiceProvider
|
|||||||
$app['image'] = $app->share(function ($app) {
|
$app['image'] = $app->share(function ($app) {
|
||||||
return new ImageManager($app['config']->get('image::config'));
|
return new ImageManager($app['config']->get('image::config'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$app->alias('image', 'Intervention\Image\ImageManager');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,6 +51,8 @@ class ImageServiceProviderLaravel5 extends ServiceProvider
|
|||||||
$app['image'] = $app->share(function ($app) {
|
$app['image'] = $app->share(function ($app) {
|
||||||
return new ImageManager($app['config']->get('image'));
|
return new ImageManager($app['config']->get('image'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$app->alias('image', 'Intervention\Image\ImageManager');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user