TDoG-Skin/app/Http/Middleware/FireUserAuthenticated.php

18 lines
295 B
PHP
Raw Normal View History

2024-08-17 18:43:48 +08:00
<?php
namespace App\Http\Middleware;
use Closure;
class FireUserAuthenticated
{
public function handle($request, Closure $next)
{
if (auth()->check()) {
event(new \App\Events\UserAuthenticated($request->user()));
}
return $next($request);
}
}