Add mail driver to the wizard

This commit is contained in:
Joseph Cohen
2016-05-28 10:37:45 -05:00
committed by James Brooks
parent 04215fc37a
commit ca3f516457
3 changed files with 29 additions and 0 deletions

View File

@@ -41,6 +41,21 @@ class SetupController extends Controller
'memcached' => 'Memcached',
'redis' => 'Redis',
];
/**
* Array of cache drivers.
*
* @var string[]
*/
protected $mailDrivers = [
'log' => 'Log (Testing)',
'smtp' => 'SMTP',
'mail' => 'Mail',
'sendmail' => 'Sendmail',
'mailgun' => 'Mailgun',
'mandrill' => 'Mandrill',
'ses' => 'Amazon SES',
'sparkpost' => 'SparkPost',
];
/**
* Array of step1 rules.
@@ -112,6 +127,7 @@ class SetupController extends Controller
return View::make('setup')
->withPageTitle(trans('setup.setup'))
->withCacheDrivers($this->cacheDrivers)
->withMailDrivers($this->mailDrivers)
->withUserLanguage($userLanguage)
->withAppUrl(Request::root());
}

View File

@@ -23,6 +23,7 @@ return [
'enable_google2fa' => 'Enable Google Two Factor Authentication',
'cache_driver' => 'Cache Driver',
'session_driver' => 'Session Driver',
'mail_driver' => 'Mail Driver',
],
// Login form fields

View File

@@ -56,6 +56,18 @@
<span class="text-danger">{{ $errors->first('env.session_driver') }}</span>
@endif
</div>
<div class="form-group">
<label>{{ trans('forms.setup.mail_driver') }}</label>
<select name="env[mail_driver]" class="form-control" required>
<option disabled>{{ trans('forms.setup.mail_driver') }}</option>
@foreach($mail_drivers as $driver => $driverName)
<option value="{{ $driver }}" {{ Binput::old('env.mail_driver') == $driver ? "selected" : null }}>{{ $driverName }}</option>
@endforeach
</select>
@if($errors->has('env.mail_driver'))
<span class="text-danger">{{ $errors->first('env.mail_driver') }}</span>
@endif
</div>
</fieldset>
<hr>
<div class="form-group text-center">