2019-04-25 13:01:39 +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()));
|
|
|
|
}
|
2019-05-19 13:49:44 +08:00
|
|
|
|
2019-04-25 13:01:39 +08:00
|
|
|
return $next($request);
|
|
|
|
}
|
|
|
|
}
|