We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1da2e9 commit 9a82986Copy full SHA for 9a82986
1 file changed
app/Providers/AppServiceProvider.php
@@ -3,9 +3,11 @@
3
namespace App\Providers;
4
5
use Illuminate\Foundation\Http\Events\RequestHandled;
6
+use Illuminate\Support\Facades\Auth;
7
use Illuminate\Support\Facades\Event;
8
use Illuminate\Support\Facades\Log;
9
use Illuminate\Support\ServiceProvider;
10
+use Laravel\Nightwatch\Facades\Nightwatch;
11
12
class AppServiceProvider extends ServiceProvider
13
{
@@ -30,5 +32,11 @@ public function boot(): void
30
32
'user_agent' => $event->request->userAgent(),
31
33
]);
34
});
35
+
36
+ Nightwatch::user(fn ($user) => [
37
+ 'ip' => request()->ip(),
38
+ 'user_agent' => request()->userAgent(),
39
+ 'name' => Auth::user()?->email ?? 'guest',
40
+ ]);
41
}
42
0 commit comments