Skip to content

Commit 9a82986

Browse files
committed
wip
1 parent b1da2e9 commit 9a82986

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

app/Providers/AppServiceProvider.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
namespace App\Providers;
44

55
use Illuminate\Foundation\Http\Events\RequestHandled;
6+
use Illuminate\Support\Facades\Auth;
67
use Illuminate\Support\Facades\Event;
78
use Illuminate\Support\Facades\Log;
89
use Illuminate\Support\ServiceProvider;
10+
use Laravel\Nightwatch\Facades\Nightwatch;
911

1012
class AppServiceProvider extends ServiceProvider
1113
{
@@ -30,5 +32,11 @@ public function boot(): void
3032
'user_agent' => $event->request->userAgent(),
3133
]);
3234
});
35+
36+
Nightwatch::user(fn ($user) => [
37+
'ip' => request()->ip(),
38+
'user_agent' => request()->userAgent(),
39+
'name' => Auth::user()?->email ?? 'guest',
40+
]);
3341
}
3442
}

0 commit comments

Comments
 (0)