Skip to content

Commit

Permalink
Merge pull request #15 from adriaanzon/patch-1
Browse files Browse the repository at this point in the history
Fix markdown headings and typo
  • Loading branch information
freekmurze committed Mar 30, 2017
2 parents b5b5120 + 0e35287 commit f37a4a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -95,9 +95,9 @@ return [

];
```
##Usage
## Usage

###Signing URLs
### Signing URLs
URL's can be signed with the `sign`-method:
```php
UrlSigner::sign('https://myapp.com/protected-route');
Expand All @@ -117,13 +117,13 @@ will be valid up to that moment. This example uses Carbon for convenience:
UrlSigner::sign('https://myapp.com/protected-route', Carbon\Carbon::now()->addHours(2); );
```

###Validating URLs
### Validating URLs
To validate a signed URL, simply call the `validate()`-method. This return a boolean.
```php
UrlSigner::validate('https://app.com/protected-route?expires=xxxxxx&signature=xxxxxx');
```

###Protecting routes with middleware
### Protecting routes with middleware
The package also provides a middleware to protect routes:

```php
Expand All @@ -144,8 +144,8 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen
$ vendor/bin/phpunit
```

##Usage outside Laravel
If you're working on a non-Laraval project, you can use the [framework agnostic version](https://github.com/spatie/url-signer).
## Usage outside Laravel
If you're working on a non-Laravel project, you can use the [framework agnostic version](https://github.com/spatie/url-signer).

## Contributing

Expand Down

0 comments on commit f37a4a7

Please sign in to comment.