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

13 lines
279 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)
{
2019-03-31 11:00:07 +08:00
abort_if(option('require_verification') && ! auth()->user()->verified, 403, trans('auth.check.verified'));
2018-08-17 12:32:44 +08:00
return $next($request);
}
}