fix: 修复 ApiFormRequest 中 lottery_locale 属性的获取方式
- 将 lottery_locale 的获取方式从 request 属性更新为 attributes 属性,确保正确获取请求中的本地化设置。
This commit is contained in:
@@ -14,7 +14,7 @@ abstract class ApiFormRequest extends FormRequest
|
|||||||
*/
|
*/
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
$locale = $this->request->attributes->get('lottery_locale')
|
$locale = $this->attributes->get('lottery_locale')
|
||||||
?? config('lottery.locales.fallback', 'en');
|
?? config('lottery.locales.fallback', 'en');
|
||||||
|
|
||||||
$labels = trans('validation.attributes', [], (string) $locale);
|
$labels = trans('validation.attributes', [], (string) $locale);
|
||||||
|
|||||||
Reference in New Issue
Block a user