Skip to content

Commit 4e7ae8a

Browse files
committed
Lumen Service Provider
1 parent b4a582e commit 4e7ae8a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
namespace BeyondCode\QueryDetector;
3+
4+
use Illuminate\Support\ServiceProvider;
5+
6+
class LumenQueryDetectorServiceProvider extends ServiceProvider
7+
{
8+
9+
public function register()
10+
{
11+
$this->app->configure('querydetector');
12+
$this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'querydetector');
13+
14+
$this->app->middleware([
15+
QueryDetectorMiddleware::class
16+
]);
17+
18+
$this->app->singleton(QueryDetector::class);
19+
$this->app->alias(QueryDetector::class, 'querydetector');
20+
}
21+
}

0 commit comments

Comments
 (0)