Skip to content

Commit

Permalink
Merge pull request #167 from ishannz/l-5.4
Browse files Browse the repository at this point in the history
update for lumen/laravel 5.4
  • Loading branch information
barryvdh authored Feb 9, 2017
2 parents 864470e + 8859f4a commit dea7284
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LumenServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function register()
public function boot()
{
if ($this->app['config']->get('snappy.pdf.enabled')) {
$this->app['snappy.pdf'] = $this->app->share(function ($app) {
$this->app->singleton('snappy.pdf',function ($app) {
$binary = $app['config']->get('snappy.pdf.binary', '/usr/local/bin/wkhtmltopdf');
$options = $app['config']->get('snappy.pdf.options', array());
$env = $app['config']->get('snappy.pdf.env', array());
Expand All @@ -41,14 +41,14 @@ public function boot()
return $snappy;
});

$this->app['snappy.pdf.wrapper'] = $this->app->share(function ($app) {
$this->app->singleton('snappy.pdf.wrapper',function ($app) {
return new PdfWrapper($app['snappy.pdf']);
});
$this->app->alias('snappy.pdf.wrapper', 'Barryvdh\Snappy\PdfWrapper');
}

if ($this->app['config']->get('snappy.image.enabled')) {
$this->app['snappy.image'] = $this->app->share(function ($app) {
$this->app->singleton('snappy.image',function ($app) {
$binary = $app['config']->get('snappy.image.binary', '/usr/local/bin/wkhtmltoimage');
$options = $app['config']->get('snappy.image.options', array());
$env = $app['config']->get('snappy.image.env', array());
Expand All @@ -62,7 +62,7 @@ public function boot()
return $image;
});

$this->app['snappy.image.wrapper'] = $this->app->share(function ($app) {
$this->app->singleton('snappy.image.wrapper',function ($app) {
return new ImageWrapper($app['snappy.image']);
});
$this->app->alias('snappy.image.wrapper', 'Barryvdh\Snappy\ImageWrapper');
Expand Down

2 comments on commit dea7284

@patrickoliveras
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... Is it ok to use this for L5.4?

@barryvdh
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think so

Please sign in to comment.