blessing-skin-server/app/Http/Middleware/CheckUserVerified.php

16 lines
304 B
PHP
Raw Normal View History

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