@@ -309,7 +309,7 @@ public function it_migrates_disk_with_local_driver()
309309 'public' => [
310310 'driver' => 'local',
311311 'root' => storage_path('app/public'),
312- 'url' => env('APP_URL').'/storage',
312+ 'url' => rtrim((string) env('APP_URL'), '/ ').'/storage',
313313 'visibility' => 'public',
314314 'throw' => false,
315315 'report' => false,
@@ -380,7 +380,7 @@ public function it_migrates_disk_with_s3_driver()
380380 'public' => [
381381 'driver' => 'local',
382382 'root' => storage_path('app/public'),
383- 'url' => env('APP_URL').'/storage',
383+ 'url' => rtrim((string) env('APP_URL'), '/ ').'/storage',
384384 'visibility' => 'public',
385385 'throw' => false,
386386 'report' => false,
@@ -450,7 +450,7 @@ public function it_migrates_disk_with_terser_key_when_assets_already_exists()
450450 'public' => [
451451 'driver' => 'local',
452452 'root' => storage_path('app/public'),
453- 'url' => env('APP_URL').'/storage',
453+ 'url' => rtrim((string) env('APP_URL'), '/ ').'/storage',
454454 'visibility' => 'public',
455455 'throw' => false,
456456 'report' => false,
@@ -526,7 +526,7 @@ public function it_migrates_multiple_disks_with_terser_keys_only()
526526 'public' => [
527527 'driver' => 'local',
528528 'root' => storage_path('app/public'),
529- 'url' => env('APP_URL').'/storage',
529+ 'url' => rtrim((string) env('APP_URL'), '/ ').'/storage',
530530 'visibility' => 'public',
531531 'throw' => false,
532532 'report' => false,
@@ -633,7 +633,7 @@ public function it_overwrites_disks_when_forced()
633633 'public' => [
634634 'driver' => 'local',
635635 'root' => storage_path('app/public'),
636- 'url' => env('APP_URL').'/storage',
636+ 'url' => rtrim((string) env('APP_URL'), '/ ').'/storage',
637637 'visibility' => 'public',
638638 'throw' => false,
639639 'report' => false,
@@ -813,6 +813,17 @@ protected function normalizeLocalConfig($config)
813813 ],
814814EOT;
815815
816+ // Laravel 13+
817+ $ variants [] = <<<'EOT'
818+ 'local' => [
819+ 'driver' => 'local',
820+ 'root' => storage_path('app/private'),
821+ 'serve' => false,
822+ 'throw' => false,
823+ 'report' => false,
824+ ],
825+ EOT;
826+
816827 // Current version
817828 $ current = <<<'EOT'
818829 'local' => [
@@ -859,8 +870,8 @@ protected function normalizePublicConfig($config)
859870 ],
860871EOT;
861872
862- // Current version
863- $ current = <<<'EOT'
873+ // Up until Laravel 12.44
874+ $ variants [] = <<<'EOT'
864875 'public' => [
865876 'driver' => 'local',
866877 'root' => storage_path('app/public'),
@@ -871,6 +882,18 @@ protected function normalizePublicConfig($config)
871882 ],
872883EOT;
873884
885+ // Current version (Laravel 12.45+)
886+ $ current = <<<'EOT'
887+ 'public' => [
888+ 'driver' => 'local',
889+ 'root' => storage_path('app/public'),
890+ 'url' => rtrim((string) env('APP_URL'), '/').'/storage',
891+ 'visibility' => 'public',
892+ 'throw' => false,
893+ 'report' => false,
894+ ],
895+ EOT;
896+
874897 foreach ($ variants as $ variant ) {
875898 $ config = $ this ->normalizeVariantInConfig ($ variant , $ current , $ config );
876899 }
0 commit comments