Skip to content

Commit 8ee5317

Browse files
committed
Move exception strings to Language/
1 parent 26f8628 commit 8ee5317

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Exceptions/AlertsException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ class AlertsException extends FrameworkException implements ExceptionInterface
77
{
88
public static function forInvalidTemplate(string $template = null)
99
{
10-
return new static("'{$template}' is not a valid Alerts template.");
10+
return new static(lang('Alerts.invalidTemplate', [$template]));
1111
}
1212
public static function forMissingTemplateView(string $template = null)
1313
{
14-
return new static("Could not find template view file: '{$template}'.");
14+
return new static(lang('Alerts.missingTemplateView', [$template]));
1515
}
1616
}

src/Language/en/Alerts.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
return [
4+
'invalidTemplate' => '"{0}" is not a valid Alerts template.',
5+
'missingTemplateView' => 'Could not find template view file: "{0}".',
6+
];

0 commit comments

Comments
 (0)