PHP code example of pavelzanek / redirections-laravel

1. Go to this page and download the library: Download pavelzanek/redirections-laravel 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/ */

    

pavelzanek / redirections-laravel example snippets


Event::listen(\PavelZanek\RedirectionsLaravel\Events\RedirectWasUsedEvent::class, function ($event) {
    dd($event->redirect);
});

php artisan vendor:publish --tag=redirections-migrations

php artisan vendor:publish --tag=redirections-config

php artisan vendor:publish --tag=redirections-views

php artisan vendor:publish --tag=redirections-translations

php artisan redirections:prune-database

protected function schedule(Schedule $schedule)
{
    $schedule->command('redirections:prune')->dailyAt('8:00');
}