From 59c5f66c62f481e7be92349860b821f06375cbf3 Mon Sep 17 00:00:00 2001 From: rush Date: Wed, 3 Feb 2016 18:46:50 +0300 Subject: [PATCH] added laravel service provider --- README.md | 12 ++++++++++++ composer.json | 8 ++++++-- src/hotrush/Webshotter/WebshotServiceProvider.php | 15 +++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/hotrush/Webshotter/WebshotServiceProvider.php diff --git a/README.md b/README.md index 45b162f..2ae2756 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,18 @@ Take website's screenshots with PHP/PhantomJS and save them to PNG, JPG or PDF composer require hotrush/webshotter ``` +## Laravel installation + +After installing package via composer add a service provider to your config/app.php +``` +// app/config/app.php + +'providers' => [ + ..., + hotrush\Webshotter\WebshotServiceProvider::class +]; +``` + ## Usage ``` diff --git a/composer.json b/composer.json index 6b27a07..665a5a0 100644 --- a/composer.json +++ b/composer.json @@ -2,9 +2,10 @@ "name": "hotrush/webshotter", "description": "Make screnshots of webpages with phantomjs", "homepage": "https://github.com/hotrush/webshotter", - "keywords": ["image", "gd", "imagick", "phantomjs", "laravel", "screenshot", "webshot", "webpage", "png", "pdf", "jpg"], + "keywords": ["image", "gd", "imagick", "phantomjs", "laravel", "lumen", "screenshot", "webshot", "webpage", "png", "pdf", "jpg"], "require": { - "php": ">=5.4.0" + "php": ">=5.4.0", + "illuminate/support": "4.*|5.*" }, "require-dev": { "phpunit/phpunit": "^4.8" @@ -21,5 +22,8 @@ "hotrush\\Webshotter\\": "src/hotrush/Webshotter" } }, + "bin": [ + "bin/phantomjs" + ], "minimum-stability": "stable" } diff --git a/src/hotrush/Webshotter/WebshotServiceProvider.php b/src/hotrush/Webshotter/WebshotServiceProvider.php new file mode 100644 index 0000000..cfbb5b1 --- /dev/null +++ b/src/hotrush/Webshotter/WebshotServiceProvider.php @@ -0,0 +1,15 @@ +app->bind( + 'webshot', + 'hotrush\Webshot' + ); + } +}