1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-13 17:34:04 +02:00

Added IoC container alias to enable automatic dependency injection

This commit is contained in:
Oliver Vogel
2015-05-09 18:06:30 +02:00
parent 6626d7624a
commit 79f0a35da7
2 changed files with 4 additions and 0 deletions

View File

@@ -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');
} }
} }

View File

@@ -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');
} }
/** /**