новый дизайн
This commit is contained in:
@@ -24,8 +24,7 @@ class LandingController extends Controller
|
||||
Request $request,
|
||||
AzerothCoreAccountService $accounts,
|
||||
NewsService $news,
|
||||
): Response
|
||||
{
|
||||
): Response {
|
||||
$realmConfig = config('moonwell.realm');
|
||||
$rates = $realmConfig['rates'] ?? [];
|
||||
$user = Auth::user();
|
||||
@@ -78,6 +77,11 @@ class LandingController extends Controller
|
||||
'moon' => true,
|
||||
],
|
||||
'registerEndpoint' => route('game-account.store'),
|
||||
'legalUrls' => [
|
||||
'published' => (bool) config('moonwell.legal.published'),
|
||||
'offer' => config('moonwell.legal.published') ? route('legal.offer') : null,
|
||||
'privacy' => config('moonwell.legal.published') ? route('legal.privacy') : null,
|
||||
],
|
||||
'inviteRequired' => (bool) config('moonwell.registration.require_invite_code'),
|
||||
'csrfToken' => csrf_token(),
|
||||
'auth' => [
|
||||
@@ -108,14 +112,13 @@ class LandingController extends Controller
|
||||
RegisterGameAccountRequest $request,
|
||||
AzerothCoreAccountRegistrar $registrar,
|
||||
InviteCodeService $inviteCodes,
|
||||
): RedirectResponse
|
||||
{
|
||||
): RedirectResponse {
|
||||
try {
|
||||
$register = fn (): array => $registrar->register(
|
||||
$request->string('username')->toString(),
|
||||
$request->string('email')->toString(),
|
||||
$request->string('password')->toString(),
|
||||
);
|
||||
$request->string('username')->toString(),
|
||||
$request->string('email')->toString(),
|
||||
$request->string('password')->toString(),
|
||||
);
|
||||
|
||||
$result = config('moonwell.registration.require_invite_code')
|
||||
? $inviteCodes->redeemForRegistration(
|
||||
@@ -152,7 +155,7 @@ class LandingController extends Controller
|
||||
private function errorBag(): array
|
||||
{
|
||||
$errors = session()->get('errors');
|
||||
if (!$errors) {
|
||||
if (! $errors) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user