File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 13
13
"php" : " ^8.0" ,
14
14
"ext-pdo" : " *" ,
15
15
"laravel/helpers" : " ^1.5" ,
16
- "illuminate/console" : " ~5.8.0|^6.0|^7.0|^8.0|^9.0"
16
+ "illuminate/console" : " ~5.8.0|^6.0|^7.0|^8.0|^9.0" ,
17
+ "illuminate/support" : " ^5.5|^6.0|^7.0|^8.0|^9.0"
17
18
},
18
19
"autoload" : {
19
20
"psr-4" : {
Original file line number Diff line number Diff line change 11
11
use Nanvaie \DatabaseRepository \Commands \MakeRepository ;
12
12
use Nanvaie \DatabaseRepository \Commands \MakeResource ;
13
13
use Illuminate \Support \ServiceProvider ;
14
+ use Laravel \Lumen \Application as LumenApplication ;
15
+ use Illuminate \Foundation \Application as LaravelApplication ;
14
16
15
17
/**
16
- * Laravel service provider for DatabaseRepositor.
17
- *
18
+ * Laravel service provider for DatabaseRepository.
18
19
*/
19
20
class DatabaseRepositoryServiceProvider extends ServiceProvider
20
21
{
@@ -28,13 +29,15 @@ class DatabaseRepositoryServiceProvider extends ServiceProvider
28
29
*/
29
30
public function boot ()
30
31
{
31
- if ($ this ->app ->runningInConsole ()) {
32
+ if ($ this ->app instanceof LaravelApplication && $ this -> app ->runningInConsole ()) {
32
33
$ this ->publishes ([
33
- __DIR__ . ' /Config / ' . self ::CONFIG_FILE => config_path (self ::CONFIG_FILE ),
34
- ], 'config ' );
35
-
36
- $ this ->register ( );
34
+ __DIR__ . ' /config / ' . self ::CONFIG_FILE => config_path (self ::CONFIG_FILE ),
35
+ ], 'telegram- config ' );
36
+ } elseif ( $ this -> app instanceof LumenApplication) {
37
+ $ this ->app -> configure ( ' telegram ' );
37
38
}
39
+
40
+ $ this ->register ();
38
41
}
39
42
40
43
/**
You can’t perform that action at this time.
0 commit comments