Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mtownsend5512 committed Aug 20, 2019
1 parent f84655c commit 86428e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ composer require mtownsend/remove-bg

*This package is designed to work with any PHP 7.0+ application but has special support for Laravel.*

### Registering the service provider (Laravel)
### Registering the service provider (Laravel users)

For Laravel 5.4 and lower, add the following line to your ``config/app.php``:

Expand All @@ -39,7 +39,7 @@ To register the service provider, add the following line to ``app/bootstrap/app.
$app->register(Mtownsend\RemoveBg\Providers\RemoveBgServiceProvider::class);
```

### Publishing the config file (Laravel)
### Publishing the config file (Laravel users)

````
php artisan vendor:publish --provider="Mtownsend\RemoveBg\Providers\RemoveBgServiceProvider"
Expand Down Expand Up @@ -122,7 +122,7 @@ $removebg->url($absoluteUrl)

The Remove.bg api offers an endpoint to check your account's credit balance and free api call usage. If your application needs to check your available credits before processing images this package makes it an absolute breeze!

The following code example is how you can check programmatically check your account information. Note, the ``account`` method has one optional argument: `$getResponseAsObject = true`. By default your response will be returned as an object. You can return the response as an associative array by passing `false` to the `account(false)` method.
The following code example is how you can programmatically check your account information. Note, the ``account`` method has one optional argument: `$getResponseAsObject = true`. By default your response will be returned as an object. You can return the response as an associative array by passing `false` to the `account(false)` method.

````php
$removebg = new RemoveBg($apiKey);
Expand Down Expand Up @@ -161,15 +161,15 @@ if ($account->data->attributes->credits->total >= 1) {
}
````

### Using the global helper (Laravel)
### Using the global helper (Laravel users)

If you are using Laravel, this package provides a convenient helper function which is globally accessible.

```php
removebg()->url($absoluteUrl)->save(public_path('path/to/your/file.png'));
```

### Using the facade (Laravel)
### Using the facade (Laravel users)

If you are using Laravel, this package provides a facade. To register the facade add the following line to your ``config/app.php`` under the ``aliases`` key.

Expand Down

0 comments on commit 86428e9

Please sign in to comment.