Add a setting helper and fix email name. Closes #2410
This commit is contained in:
@@ -9,10 +9,25 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use CachetHQ\Cachet\Settings\Repository;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Jenssegers\Date\Date;
|
||||
|
||||
if (!function_exists('setting')) {
|
||||
/**
|
||||
* Get a setting, or the default value.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function setting($name, $default = null) {
|
||||
return app(Repository::class)->get($name, $default);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('set_active')) {
|
||||
/**
|
||||
* Set active class if request is in path.
|
||||
|
||||
@@ -71,7 +71,7 @@ $style = [
|
||||
<tr>
|
||||
<td style="{{ $style['email-masthead'] }}">
|
||||
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}" href="{{ url('/') }}" target="_blank">
|
||||
{{ config('app.name') }}
|
||||
{{ setting('app_name') }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -140,7 +140,7 @@ $style = [
|
||||
|
||||
<!-- Salutation -->
|
||||
<p style="{{ $style['paragraph'] }}">
|
||||
Regards,<br>{{ config('app.name') }}
|
||||
Regards,<br>{{ setting('app_name') }}
|
||||
</p>
|
||||
|
||||
<!-- Sub Copy -->
|
||||
@@ -176,7 +176,7 @@ $style = [
|
||||
<td style="{{ $fontFamily }} {{ $style['email-footer_cell'] }}">
|
||||
<p style="{{ $style['paragraph-sub'] }}">
|
||||
© {{ date('Y') }}
|
||||
<a style="{{ $style['anchor'] }}" href="{{ url('/') }}" target="_blank">{{ config('app.name') }}</a>.
|
||||
<a style="{{ $style['anchor'] }}" href="{{ url('/') }}" target="_blank">{{ setting('app_name') }}</a>.
|
||||
All rights reserved.
|
||||
</p>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user