Download the PHP package cwsdigital/twill-redirects without Composer
On this page you can find all versions of the php package cwsdigital/twill-redirects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cwsdigital/twill-redirects
More information about cwsdigital/twill-redirects
Files in cwsdigital/twill-redirects
Package twill-redirects
Short Description Add an simple redirect capsule to your Twill projects.
License MIT
Informations about the package twill-redirects
Twill Redirects
What it does
This package provides a simple way to allow users to manage any Redirects for their Twill Sites.
Requirements
This package requires Laravel 8 or higher, PHP8 or higher, and Twill 3.0 or higher.
Installation
First you want to install this dependency using composer, you can do this by running the following command:
Configuration
Adding to your Twill Admin
This package is set up to automatically register the Redirects Capsule and add it directly to the Twill Admin Navigation.
Twill Admin Menu
You may want to determine where to place the Redirects
module in your Twill Navigation, for example, you want Redirects to appear
as a secondary menu item within a primary navigation of Settings.
First you will need to publish the config file:
Secondly, change the 'automaticNavigation' to false. This will prevent Twill from automatically adding the Redirects Primary Navigation link.
Adding to your frontend Middleware
To make your frontend routing aware of the Redirect middleware you need to add this to the laravel middleware in Kernel.php
Events
There are two events triggered in the Redirect Middleware.
- RedirectWasFound event is triggered when a redirect has been found.
- RedirectWasNotFound event is triggered when no redirect was found.
Changelog
Please see CHANGELOG for details.
License
The MIT License (MIT). Please see License File for more information.