File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -451,9 +451,9 @@ public static function createFrom(self $from, $to = null)
451
451
452
452
$ request ->headers ->replace ($ from ->headers ->all ());
453
453
454
- $ request ->setLocale ($ from ->getLocale ());
454
+ $ request ->setRequestLocale ($ from ->getLocale ());
455
455
456
- $ request ->setDefaultLocale ($ from ->getDefaultLocale ());
456
+ $ request ->setDefaultRequestLocale ($ from ->getDefaultLocale ());
457
457
458
458
$ request ->setJson ($ from ->json ());
459
459
@@ -572,6 +572,28 @@ public function setLaravelSession($session)
572
572
$ this ->session = $ session ;
573
573
}
574
574
575
+ /**
576
+ * Set the locale for the request instance.
577
+ *
578
+ * @param string $locale
579
+ * @return void
580
+ */
581
+ public function setRequestLocale (string $ locale )
582
+ {
583
+ $ this ->locale = $ locale ;
584
+ }
585
+
586
+ /**
587
+ * Set the default locale for the request instance.
588
+ *
589
+ * @param string $locale
590
+ * @return void
591
+ */
592
+ public function setDefaultRequestLocale (string $ locale )
593
+ {
594
+ $ this ->defaultLocale = $ locale ;
595
+ }
596
+
575
597
/**
576
598
* Get the user making the request.
577
599
*
You can’t perform that action at this time.
0 commit comments