донат шоп, управление магазином, яндекс метрика
This commit is contained in:
@@ -78,6 +78,7 @@ class LandingController extends Controller
|
||||
'moon' => true,
|
||||
],
|
||||
'registerEndpoint' => route('game-account.store'),
|
||||
'inviteRequired' => (bool) config('moonwell.registration.require_invite_code'),
|
||||
'csrfToken' => csrf_token(),
|
||||
'auth' => [
|
||||
'authenticated' => $user !== null,
|
||||
@@ -110,15 +111,19 @@ class LandingController extends Controller
|
||||
): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$result = $inviteCodes->redeemForRegistration(
|
||||
$request->string('invite_code')->toString(),
|
||||
$request->string('username')->toString(),
|
||||
fn (): array => $registrar->register(
|
||||
$register = fn (): array => $registrar->register(
|
||||
$request->string('username')->toString(),
|
||||
$request->string('email')->toString(),
|
||||
$request->string('password')->toString(),
|
||||
),
|
||||
);
|
||||
);
|
||||
|
||||
$result = config('moonwell.registration.require_invite_code')
|
||||
? $inviteCodes->redeemForRegistration(
|
||||
$request->string('invite_code')->toString(),
|
||||
$request->string('username')->toString(),
|
||||
$register,
|
||||
)
|
||||
: $register();
|
||||
} catch (DuplicateGameAccountException $exception) {
|
||||
return back()
|
||||
->withErrors([$exception->field => $exception->getMessage()])
|
||||
|
||||
Reference in New Issue
Block a user