Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
crisu83 committed Jan 23, 2018
1 parent 2c4634f commit fc933b6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GraphQL module for the Laravel and Lumen PHP frameworks.

## Requirements

- PHP 5.6 or newer
- PHP 7.1 or newer
- [Composer](http://getcomposer.org)
- [Lumen](https://lumen.laravel.com/) / [Laravel](https://laravel.com) 5.5 or newer

Expand Down Expand Up @@ -46,6 +46,20 @@ Add the following line to ```bootstrap/app.php```:
$app->register(Digia\Lumen\GraphQL\GraphQLServiceProvider::class);
```

Add the following lines to ```routes/web.php```:

```php
$router->get('/graphql', [
'uses' => 'Digia\Lumen\GraphQL\Http\GraphQLController@renderGraphiQL',
]);

$router->post('/graphql', [
'uses' => 'Digia\Lumen\GraphQL\Http\GraphQLController@handle',
]);
```

**NOTE:** Make sure that your route group does not have a ```namespace``` attribute. Otherwise Lumen will be unable to find the ```GraphQLController```.

## Contributing

Please read the [guidelines](.github/CONTRIBUTING.md).
Expand Down

0 comments on commit fc933b6

Please sign in to comment.