Skip to content

Commit 7e5f4db

Browse files
committed
Minor code refactor
1 parent 2720bb2 commit 7e5f4db

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

web_link.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,9 @@ You can also add links to the HTTP response directly from controllers and servic
166166
public function index(Request $request)
167167
{
168168
$linkProvider = $request->attributes->get('_links', new GenericLinkProvider());
169-
$request->attributes->set(
170-
'_links',
171-
$linkProvider->withLink(
172-
(new Link('preload', '/app.css'))->withAttribute('as', 'style')
173-
)
174-
);
169+
$request->attributes->set('_links', $linkProvider->withLink(
170+
(new Link('preload', '/app.css'))->withAttribute('as', 'style')
171+
));
175172

176173
return $this->render('...');
177174
}

0 commit comments

Comments
 (0)