TDoG-Skin/app/Http/Middleware/FireUserAuthenticated.php
2024-08-17 19:13:54 +08:00

18 lines
295 B
PHP
Executable File

<?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);
}
}