v7.0.0 release

This commit is contained in:
HeuJung
2026-07-01 10:30:32 +09:00
parent 0e7fa04b03
commit c4ea9a6cd1
3582 changed files with 626189 additions and 160151 deletions
+20
View File
@@ -3,6 +3,7 @@
namespace App\Notifications;
use App\Extension\HookManager;
use Illuminate\Contracts\Translation\HasLocalePreference;
use Illuminate\Notifications\Notification;
/**
@@ -52,4 +53,23 @@ abstract class BaseNotification extends Notification
$notifiable
);
}
/**
* 알림 렌더에 사용할 수신자 로케일을 해석합니다.
*
* 사용자 언어 SSoT(users.language)를 따르는 HasLocalePreference 수신자는
* preferredLocale() 값을 우선합니다. contract 미구현 수신자나 빈 선호값은
* 현재 app locale 로 폴백합니다.
*
* @param object $notifiable 알림 수신자
* @return string 해석된 로케일
*/
public static function resolveNotifiableLocale(object $notifiable): string
{
$preferred = $notifiable instanceof HasLocalePreference
? $notifiable->preferredLocale()
: null;
return $preferred ?? app()->getLocale();
}
}