Skip to content

Commit 7118173

Browse files
committed
Added important step: how to append the redirection middleware
1 parent 6480886 commit 7118173

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,18 @@ Finally, you have to vendor:publish the `sirodiaz/laravel-redirection` config fi
9898
class used now.
9999

100100
If you want to add more status codes for another type of redirect purposes, add them to your config/redirection.php
101-
config file. By default, you have the most common redirections codes: 301, 302 and 307.
101+
config file. By default, you have the most common redirections codes: 301, 302 and 307.
102+
103+
Ey! **don't forget** to append the middleware `SiroDiaz\Redirection\RedirectRequests` to your `app/Http/Kernel.php` file
104+
105+
```php
106+
// app/Http/Kernel.php
107+
108+
protected $middleware = [
109+
...
110+
\SiroDiaz\Redirection\RedirectRequests::class,
111+
],
112+
```
102113

103114
## Testing
104115

0 commit comments

Comments
 (0)