Skip to content

Commit 240b29a

Browse files
Merge pull request #731 from erikn69/patch-6
Restore Lumen support
2 parents 7b802f1 + d7ef749 commit 240b29a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AuditingEventServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
namespace OwenIt\Auditing;
44

5-
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
5+
if (app() instanceof \Illuminate\Foundation\Application) {
6+
class_alias(\Illuminate\Foundation\Support\Providers\EventServiceProvider::class, '\OwenIt\Auditing\ServiceProvider');
7+
} else {
8+
class_alias(\Laravel\Lumen\Providers\EventServiceProvider::class, '\OwenIt\Auditing\ServiceProvider');
9+
}
610
use OwenIt\Auditing\Events\AuditCustom;
711
use OwenIt\Auditing\Listeners\RecordCustomAudit;
812

0 commit comments

Comments
 (0)