We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 63922b7 + 7e5f4db commit 7096d54Copy full SHA for 7096d54
web_link.rst
@@ -170,7 +170,9 @@ You can also add links to the HTTP response directly from controllers and servic
170
171
// alternative if you don't want to use the addLink() shortcut
172
$linkProvider = $request->attributes->get('_links', new GenericLinkProvider());
173
- $request->attributes->set('_links', $linkProvider->withLink(new Link('preload', '/app.css', ['as' : 'style'])));
+ $request->attributes->set('_links', $linkProvider->withLink(
174
+ (new Link('preload', '/app.css'))->withAttribute('as', 'style')
175
+ ));
176
177
return $this->render('...');
178
}
0 commit comments