{{ trans('texts.application_settings') }}

{!! Former::text('app[url]')->label(trans('texts.url'))->value(isset($_ENV['APP_URL']) ? $_ENV['APP_URL'] : Request::root()) !!} {!! Former::checkbox('https')->text(trans('texts.require'))->check(env('REQUIRE_HTTPS'))->value(1) !!} {!! Former::checkbox('debug')->text(trans('texts.enable'))->check(config('app.debug'))->value(1) !!}

{{ trans('texts.database_connection') }}

{{--- Former::select('database[default]')->label('driver')->options(['mysql' => 'MySQL', 'pgsql' => 'PostgreSQL', 'sqlite' => 'SQLite']) ->value(isset($_ENV['DB_TYPE']) ? $_ENV['DB_TYPE'] : 'mysql') ---}} {!! Former::plaintext('driver')->value('MySQL') !!} {!! Former::text('database[type][host]')->label('host')->value(isset($_ENV['DB_HOST']) ? $_ENV['DB_HOST'] : 'localhost') !!} {!! Former::text('database[type][database]')->label('database')->value(isset($_ENV['DB_DATABASE']) ? $_ENV['DB_DATABASE'] : 'ninja') !!} {!! Former::text('database[type][username]')->label('username')->value(isset($_ENV['DB_USERNAME']) ? $_ENV['DB_USERNAME'] : 'ninja') !!} {!! Former::password('database[type][password]')->label('password')->value(isset($_ENV['DB_PASSWORD']) ? $_ENV['DB_PASSWORD'] : 'ninja') !!} {!! Former::actions( Button::primary(trans('texts.test_connection'))->small()->withAttributes(['onclick' => 'testDatabase()']), '  ' ) !!}
@if (!isset($_ENV['POSTMARK_API_TOKEN']))

{{ trans('texts.email_settings') }}

{!! Former::select('mail[driver]')->label('driver')->options(['smtp' => 'SMTP', 'mail' => 'Mail', 'sendmail' => 'Sendmail', 'mailgun' => 'Mailgun']) ->value(HTMLUtils::getEnvForAccount('MAIL_DRIVER', 'smtp'))->setAttributes(['onchange' => 'mailDriverChange()']) !!} {!! Former::text('mail[from][name]')->label('from_name') ->value(HTMLUtils::getEnvForAccount('MAIL_FROM_NAME')) !!} {!! Former::text('mail[from][address]')->label('from_address') ->value(HTMLUtils::getEnvForAccount('MAIL_FROM_ADDRESS')) !!} {!! Former::text('mail[username]')->label('username') ->value(HTMLUtils::getEnvForAccount('MAIL_USERNAME')) !!}
{!! Former::text('mail[host]')->label('host') ->value(HTMLUtils::getEnvForAccount('MAIL_HOST')) !!} {!! Former::text('mail[port]')->label('port') ->value(HTMLUtils::getEnvForAccount('MAIL_PORT', '587')) !!} {!! Former::select('mail[encryption]')->label('encryption') ->options(['tls' => 'TLS', 'ssl' => 'SSL', '' => trans('texts.none')]) ->value(HTMLUtils::getEnvForAccount('MAIL_ENCRYPTION', 'tls')) !!} {!! Former::password('mail[password]')->label('password') ->value(HTMLUtils::getEnvForAccount('MAIL_PASSWORD')) !!}
{!! Former::text('mail[mailgun_domain]')->label('mailgun_domain') ->value(isset($_ENV['MAILGUN_DOMAIN']) ? $_ENV['MAILGUN_DOMAIN'] : '') !!} {!! Former::text('mail[mailgun_secret]')->label('mailgun_private_key') ->value(isset($_ENV['MAILGUN_SECRET']) ? $_ENV['MAILGUN_SECRET'] : '') !!}
{!! Former::actions( Button::primary(trans('texts.send_test_email'))->small()->withAttributes(['onclick' => 'testMail()']), '  ' ) !!}
@endif