File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,15 @@ public function handle($request, $next)
1414 {
1515 return tap ($ next ($ request ), function ($ response ) {
1616 if (count ($ assets = $ this ->manifest ->assetsForPreloading ()) > 0 ) {
17- $ response ->header ('Link ' , trim (implode (', ' , array_filter ([
18- $ response ->headers ->get ('Link ' , null ),
19- ...collect ($ assets )
20- ->map (fn ($ attributes , $ asset ) => implode ('; ' , [
21- "< $ asset> " ,
22- ...collect (array_merge (['rel ' => 'preload ' , 'as ' => 'style ' ], $ attributes ))
23- ->map (fn ($ value , $ key ) => "{$ key }= {$ value }" )
24- ->all (),
25- ]))
26- ->all (),
27- ]))));
17+ $ response ->header ('Link ' , trim (implode (', ' , array_filter (array_merge (
18+ [$ response ->headers ->get ('Link ' , null )],
19+ collect ($ assets )->map (fn ($ attributes , $ asset ) => implode ('; ' , array_merge (
20+ ["< $ asset> " ],
21+ collect (array_merge (['rel ' => 'preload ' , 'as ' => 'style ' ], $ attributes ))
22+ ->map (fn ($ value , $ key ) => "{$ key }= {$ value }" )
23+ ->all (),
24+ )))->all (),
25+ )))));
2826 }
2927 });
3028 }
You can’t perform that action at this time.
0 commit comments