Download the PHP package yotech-ai/twill-cms-redirects without Composer
On this page you can find all versions of the php package yotech-ai/twill-cms-redirects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yotech-ai/twill-cms-redirects
More information about yotech-ai/twill-cms-redirects
Files in yotech-ai/twill-cms-redirects
Package twill-cms-redirects
Short Description A Twill CMS package
License MIT
Homepage https://github.com/Yotech-AI/twill-cms-redirects
Informations about the package twill-cms-redirects
Twill CMS Redirects
This package provides a simple redirect management capsule for Twill. It registers a singleton module where you can configure redirect rules that are applied by middleware on every request.
Installation
Migration
Publish and run the package migration:
Usage
The capsule creates a singleton module called redirects
. Administrators can define redirect rules through the Twill UI. Each rule contains a from
URL, a to
URL and the status code to use.
Requests are intercepted by twill.redirects
middleware which performs the redirect if a rule matches.
Activation
Add the service provider and middleware alias to your config/twill.php
if not automatically discovered:
Laravel 11 no longer uses the Http\Kernel
class for middleware
registration. Instead, middleware is configured in bootstrap/app.php
.
Because redirect rules may apply to URLs that don't match any defined
route, the middleware should run before route resolution. Prepend it to
the global middleware stack within the withMiddleware
closure:
Seeder
A RedirectSeeder
is included and will create the initial singleton record if none exists. Twill automatically runs this seeder when you visit the capsule for the first time.
License
MIT