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.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use CachetHQ\Cachet\Settings\Repository;
|
||||||
use Illuminate\Support\Facades\Config;
|
use Illuminate\Support\Facades\Config;
|
||||||
use Illuminate\Support\Facades\Request;
|
use Illuminate\Support\Facades\Request;
|
||||||
use Jenssegers\Date\Date;
|
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')) {
|
if (!function_exists('set_active')) {
|
||||||
/**
|
/**
|
||||||
* Set active class if request is in path.
|
* Set active class if request is in path.
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ $style = [
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="{{ $style['email-masthead'] }}">
|
<td style="{{ $style['email-masthead'] }}">
|
||||||
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}" href="{{ url('/') }}" target="_blank">
|
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}" href="{{ url('/') }}" target="_blank">
|
||||||
{{ config('app.name') }}
|
{{ setting('app_name') }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -140,7 +140,7 @@ $style = [
|
|||||||
|
|
||||||
<!-- Salutation -->
|
<!-- Salutation -->
|
||||||
<p style="{{ $style['paragraph'] }}">
|
<p style="{{ $style['paragraph'] }}">
|
||||||
Regards,<br>{{ config('app.name') }}
|
Regards,<br>{{ setting('app_name') }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- Sub Copy -->
|
<!-- Sub Copy -->
|
||||||
@@ -176,7 +176,7 @@ $style = [
|
|||||||
<td style="{{ $fontFamily }} {{ $style['email-footer_cell'] }}">
|
<td style="{{ $fontFamily }} {{ $style['email-footer_cell'] }}">
|
||||||
<p style="{{ $style['paragraph-sub'] }}">
|
<p style="{{ $style['paragraph-sub'] }}">
|
||||||
© {{ date('Y') }}
|
© {{ 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.
|
All rights reserved.
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user