Skip to content

Commit 6c3ab43

Browse files
committed
fix #2
1 parent 4de88f2 commit 6c3ab43

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Console/ListenCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Nutgram\Laravel\Console;
44

55
use Illuminate\Console\Command;
6-
use Illuminate\Support\Facades\App;
76
use SergiX44\Nutgram\Nutgram;
87
use SergiX44\Nutgram\RunningMode\SingleUpdate;
98

@@ -17,8 +16,8 @@ public function handle(): void
1716
{
1817
$this->info('Listening...');
1918
while (true) {
20-
$app = App::configure(base_path())->create();
21-
$bot = $app->make(Nutgram::class);
19+
app()->forgetInstance(Nutgram::class);
20+
$bot = app(Nutgram::class);
2221
$bot->setRunningMode(SingleUpdate::class);
2322
$bot->run();
2423
}

0 commit comments

Comments
 (0)