2018-08-17 12:32:44 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
|
|
|
|
class CheckUserVerified
|
|
|
|
{
|
|
|
|
public function handle($request, \Closure $next)
|
|
|
|
{
|
2019-03-02 22:58:37 +08:00
|
|
|
if (option('require_verification') && ! auth()->user()->verified) {
|
2018-08-17 12:32:44 +08:00
|
|
|
abort(403, trans('auth.check.verified'));
|
|
|
|
}
|
|
|
|
|
|
|
|
return $next($request);
|
|
|
|
}
|
|
|
|
}
|