fixed #594
This commit is contained in:
parent
99c735dba8
commit
270a44411d
@ -26,3 +26,5 @@ MAIL_PORT=2525
|
|||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_NAME=null
|
||||||
|
MAIL_FROM_ADDRESS=null
|
||||||
|
@ -181,17 +181,17 @@ class Settings extends Controller
|
|||||||
protected function oneCompany($key, $value)
|
protected function oneCompany($key, $value)
|
||||||
{
|
{
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
case 'company_name':
|
||||||
|
Installer::updateEnv(['MAIL_FROM_NAME' => '"' . $value . '"']);
|
||||||
|
break;
|
||||||
|
case 'company_email':
|
||||||
|
Installer::updateEnv(['MAIL_FROM_ADDRESS' => $value]);
|
||||||
|
break;
|
||||||
case 'default_locale':
|
case 'default_locale':
|
||||||
// Change default locale
|
Installer::updateEnv(['APP_LOCALE' => $value]);
|
||||||
Installer::updateEnv([
|
|
||||||
'APP_LOCALE' => $value
|
|
||||||
]);
|
|
||||||
break;
|
break;
|
||||||
case 'session_handler':
|
case 'session_handler':
|
||||||
// Change session handler
|
Installer::updateEnv(['SESSION_DRIVER' => $value]);
|
||||||
Installer::updateEnv([
|
|
||||||
'SESSION_DRIVER' => $value
|
|
||||||
]);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,6 @@ class Reset extends Notification
|
|||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
{
|
{
|
||||||
setting(['general.company_name' => config('app.name')]);
|
|
||||||
|
|
||||||
return (new MailMessage)
|
return (new MailMessage)
|
||||||
->line(trans('auth.notification.message_1'))
|
->line(trans('auth.notification.message_1'))
|
||||||
->action(trans('auth.notification.button'), url('auth/reset', $this->token))
|
->action(trans('auth.notification.button'), url('auth/reset', $this->token))
|
||||||
|
@ -269,16 +269,24 @@ class Installer
|
|||||||
$env = explode("\n", $env);
|
$env = explode("\n", $env);
|
||||||
|
|
||||||
foreach ($data as $data_key => $data_value) {
|
foreach ($data as $data_key => $data_value) {
|
||||||
|
$updated = false;
|
||||||
|
|
||||||
foreach ($env as $env_key => $env_value) {
|
foreach ($env as $env_key => $env_value) {
|
||||||
$entry = explode('=', $env_value, 2);
|
$entry = explode('=', $env_value, 2);
|
||||||
|
|
||||||
// Check if new or old key
|
// Check if new or old key
|
||||||
if ($entry[0] == $data_key) {
|
if ($entry[0] == $data_key) {
|
||||||
$env[$env_key] = $data_key . '=' . $data_value;
|
$env[$env_key] = $data_key . '=' . $data_value;
|
||||||
|
$updated = true;
|
||||||
} else {
|
} else {
|
||||||
$env[$env_key] = $env_value;
|
$env[$env_key] = $env_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Lets create if not available
|
||||||
|
if (!$updated) {
|
||||||
|
$env[] = $data_key . '=' . $data_value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$env = implode("\n", $env);
|
$env = implode("\n", $env);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{{-- Header --}}
|
{{-- Header --}}
|
||||||
@slot('header')
|
@slot('header')
|
||||||
@component('mail::header', ['url' => config('app.url')])
|
@component('mail::header', ['url' => config('app.url')])
|
||||||
{{ setting('general.company_name', config('app.name')) }}
|
{{ setting('general.company_name', config('mail.from.name', config('app.name'))) }}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
|
|
||||||
@ -21,7 +21,7 @@
|
|||||||
{{-- Footer --}}
|
{{-- Footer --}}
|
||||||
@slot('footer')
|
@slot('footer')
|
||||||
@component('mail::footer')
|
@component('mail::footer')
|
||||||
© {{ date('Y') }} {{ setting('general.company_name', config('app.name')) }}. All rights reserved.
|
© {{ date('Y') }} {{ setting('general.company_name', config('mail.from.name', config('app.name'))) }}. All rights reserved.
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{{-- Header --}}
|
{{-- Header --}}
|
||||||
@slot('header')
|
@slot('header')
|
||||||
@component('mail::header', ['url' => config('app.url')])
|
@component('mail::header', ['url' => config('app.url')])
|
||||||
{{ setting('general.company_name', config('app.name')) }}
|
{{ setting('general.company_name', config('mail.from.name', config('app.name'))) }}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
|
|
||||||
@ -21,7 +21,7 @@
|
|||||||
{{-- Footer --}}
|
{{-- Footer --}}
|
||||||
@slot('footer')
|
@slot('footer')
|
||||||
@component('mail::footer')
|
@component('mail::footer')
|
||||||
© {{ date('Y') }} {{ setting('general.company_name', config('app.name')) }}. All rights reserved.
|
© {{ date('Y') }} {{ setting('general.company_name', config('mail.from.name', config('app.name'))) }}. All rights reserved.
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
@if (! empty($salutation))
|
@if (! empty($salutation))
|
||||||
{{ $salutation }}
|
{{ $salutation }}
|
||||||
@else
|
@else
|
||||||
{!! trans('notifications.salutation', ['company_name' => setting('general.company_name', config('app.name'))]) !!}
|
{!! trans('notifications.salutation', ['company_name' => setting('general.company_name', config('mail.from.name', config('app.name')))]) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- Subcopy -->
|
<!-- Subcopy -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user