@@ -90,7 +90,7 @@ configuration.
9090To install it:
9191
9292``` bash
93- $ composer require " mtymek/blast-base-url:dev-master@dev "
93+ $ composer require mtymek/blast-base-url
9494```
9595
9696To configure it, update the file ` config/autoload/middleware-pipeline.global.php ` ,
@@ -127,9 +127,8 @@ the request URI and the operating system path to the application.
127127
128128The primary advantage of ` mtymek/blast-base-url ` is in its additional features:
129129
130- - it provides an override of ` Zend\Expressive\Helper\UrlHelper ` that is aware of
131- the base path, allowing you to create route-based URLs relative to the base
132- path.
130+ - it injects ` Zend\Expressive\Helper\UrlHelper ` with the base path, allowing you
131+ to create relative route-based URLs.
133132- it provides a new helper, ` Blast\BaseUrl\BasePathHelper ` , which allows you to
134133 create URLs relative to the base path; this is particularly useful for assets.
135134
@@ -143,29 +142,10 @@ return [
143142 Blast\BaseUrl\BasePathHelper::class => Blast\BaseUrl\BasePathHelper::class,
144143 /* ... */
145144 ],
146- 'factories' => [
147- Blast\BaseUrl\UrlHelper::class => Blast\BaseUrl\UrlHelperFactory::class,
148- /* ... */
149- ],
150- 'aliases' => [
151- // alias default UrlHelper with Blast\BaseUrl alternative
152- Helper\UrlHelper::class => Blast\BaseUrl\UrlHelper::class,
153- /* ... */
154- ],
155145 ],
156146];
157147```
158148
159- Additionally, remove the following from the same file:
160-
161- ``` php
162- 'factories' => [
163- // Remove the following line only:
164- Helper\UrlHelper::class => Helper\UrlHelperFactory::class,
165- /* ... */
166- ],
167- ```
168-
169149Finally, if you're using zend-view, you can register a new "basePath" helper in
170150your ` config/autoload/templates.global.php ` :
171151
0 commit comments