Skip to content

Commit b4b9964

Browse files
getting LogToDB instance in SaveNewLogEvent
1 parent 026a492 commit b4b9964

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Jobs/SaveNewLogEvent.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace danielme85\LaravelLogToDB\Jobs;
44

5-
use danielme85\LaravelLogToDB\Models\DBLogException;
65
use Illuminate\Bus\Queueable;
76
use Illuminate\Queue\InteractsWithQueue;
87
use Illuminate\Contracts\Queue\ShouldQueue;
@@ -15,11 +14,10 @@ class SaveNewLogEvent implements ShouldQueue
1514
/**
1615
* Create a new job instance.
1716
*
18-
* @param object $logToDb
1917
* @param \Monolog\LogRecord $record
2018
* @return void
2119
*/
22-
public function __construct(protected object $logToDb, protected LogRecord $record)
20+
public function __construct(protected LogRecord $record)
2321
{
2422
}
2523

@@ -30,6 +28,6 @@ public function __construct(protected object $logToDb, protected LogRecord $reco
3028
*/
3129
public function handle()
3230
{
33-
$this->logToDb->safeWrite($this->record);
31+
app('laravel-log-to-db')->safeWrite($this->record);
3432
}
3533
}

0 commit comments

Comments
 (0)