增加 错误
This commit is contained in:
parent
ca7a8e6681
commit
385c6596f0
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Web;
|
namespace App\Http\Controllers\Web;
|
||||||
|
|
||||||
|
use App\Exceptions\CommonException;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Support\RealNameSupport;
|
use App\Support\RealNameSupport;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
@ -39,7 +40,11 @@ public function store(Request $request): RedirectResponse
|
|||||||
return back()->with('error', '您的余额不足。请保证余额大于 1 元。');
|
return back()->with('error', '您的余额不足。请保证余额大于 1 元。');
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = $realNameSupport->create($user->id, $request->input('real_name'), $request->input('id_card'));
|
try {
|
||||||
|
$output = $realNameSupport->create($user->id, $request->input('real_name'), $request->input('id_card'));
|
||||||
|
} catch (CommonException $e) {
|
||||||
|
return back()->with('error', $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// 标记用户正在实名,缓存 600s
|
// 标记用户正在实名,缓存 600s
|
||||||
if (Cache::has('real_name:user:'.$user->id)) {
|
if (Cache::has('real_name:user:'.$user->id)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user