PHP code example of cwsdigital / twill-redirects

1. Go to this page and download the library: Download cwsdigital/twill-redirects library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cwsdigital / twill-redirects example snippets



TwillNavigation::addLink(
    NavigationLink::make()->title('Settings')
        ->forModule('redirects')
    ->doNotAddSelfAsFirstChild()
    ->setChildren([
        NavigationLink::make()->title('Redirects')->forModule('redirects'),
    ])
);

{{-- app/Http/Kernel.php --}}

protected $middleware = [
    // Add HandlesPageRedirects::class
    CwsDigital\TwillRedirects\Twill\Capsules\Redirects\Http\Middleware\HandlesPageRedirects::class,
];
shell script
$ php artisan migrate
shell script
  php artisan vendor:publish --provider="CwsDigital\TwillRedirects\TwillRedirectsServiceProvider" --tag=config