донат шоп, управление магазином, яндекс метрика

This commit is contained in:
2026-07-19 19:17:29 +04:00
parent 8bf1b852f0
commit df7f98fe8b
48 changed files with 1859 additions and 18 deletions
+11 -6
View File
@@ -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()])