dficoins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
527 B

<?php
namespace App\Http\Middleware\Auth;
use Closure;
class CheckPaypwd
{
/**
* Handle an incoming request.
* 支付密码未设置
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$user = auth('api')->user();
if (!$user || blank($user->payword)) {
return api_response()->error(1034, '请设置交易密码');
}
return $next($request);
}
}