Skip to content

Commit

Permalink
added laravel service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
hotrush committed Feb 3, 2016
1 parent 4b8ef59 commit 59c5f66
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -21,5 +22,8 @@
"hotrush\\Webshotter\\": "src/hotrush/Webshotter"
}
},
"bin": [
"bin/phantomjs"
],
"minimum-stability": "stable"
}
15 changes: 15 additions & 0 deletions src/hotrush/Webshotter/WebshotServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
namespace hotrush\Webshotter;

use Illuminate\Support\ServiceProvider;

class WebshotServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->bind(
'webshot',
'hotrush\Webshot'
);
}
}

0 comments on commit 59c5f66

Please sign in to comment.