PHP code example of milon / jigsaw-url-shortener

1. Go to this page and download the library: Download milon/jigsaw-url-shortener 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/ */

    

milon / jigsaw-url-shortener example snippets


[
    ...,
    'urlRedirects' => [
        [
            'filename' => 'twitter',
            'url' => 'https://twitter.com/to_milon',
        ],
        [
            'filename' => 'github',
            'url' => 'https://github.com/milon',
        ],
    ],
    ...
]



return [
    [
        'filename' => 'twitter',
        'url' => 'https://twitter.com/to_milon',
    ],
    [
        'filename' => 'github',
        'url' => 'https://github.com/milon',
    ],
];

[
    ...,
    'urlRedirects' => 

$events->afterBuild(Milon\JigsawUrlShortener\GenerateUrlRedirect::class);