Skip to content

Commit 84b011d

Browse files
authored
Merge pull request #48 from prajapatinirav/master
Auto package discovery. No need to add service provider and aliases i…
2 parents bb5ce97 + 30b294d commit 84b011d

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

composer.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,15 @@
2222
"Flynsarmy\\DbBladeCompiler\\": "src/"
2323
}
2424
},
25-
"minimum-stability": "stable"
26-
}
25+
"minimum-stability": "stable",
26+
"extra": {
27+
"laravel": {
28+
"providers": [
29+
"Flynsarmy\\DbBladeCompiler\\DbBladeCompilerServiceProvider"
30+
],
31+
"aliases": {
32+
"DbView": "Flynsarmy\\DbBladeCompiler\\Facades\\DbView"
33+
}
34+
}
35+
}
36+
}

readme.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ Require this package in your composer.json and run composer update (or run `comp
3131

3232
"flynsarmy/db-blade-compiler": "*"
3333

34-
After updating composer, add the ServiceProvider to the providers array in app/config/app.php
34+
The DbBladeCompilerServiceProvider is auto-discovered and registered by default, but if you want to register it yourself:
35+
add the ServiceProvider to the providers array in app/config/app.php
3536

3637
'Flynsarmy\DbBladeCompiler\DbBladeCompilerServiceProvider',
3738

38-
and the Facade to the aliases array in the same file
39+
and the DbView facade is also auto-discovered, but if you want to add it manually:
40+
add the Facade to the aliases array in config/app.php
3941

4042
'DbView' => 'Flynsarmy\DbBladeCompiler\Facades\DbView',
4143

0 commit comments

Comments
 (0)