Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ composer.lock
docs
vendor
coverage
.idea
.idea
nbproject
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ return [
];
```

If you use **Lumen**, you need to copy the config file manually and register the Lumen Service Provider in `bootstrap/app.php` file

```php
$this->app->register(\BeyondCode\QueryDetector\LumenQueryDetectorServiceProvider::class);
```

### Testing

``` bash
Expand Down
21 changes: 21 additions & 0 deletions src/LumenQueryDetectorServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
namespace BeyondCode\QueryDetector;

use Illuminate\Support\ServiceProvider;

class LumenQueryDetectorServiceProvider extends ServiceProvider
{

public function register()
{
$this->app->configure('querydetector');
$this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'querydetector');

$this->app->middleware([
QueryDetectorMiddleware::class
]);

$this->app->singleton(QueryDetector::class);
$this->app->alias(QueryDetector::class, 'querydetector');
}
}