PHP code example of erikgreasy / filament-redirects

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

    

erikgreasy / filament-redirects example snippets


// bootstrap/app.php

->withMiddleware(function (Middleware $middleware) {
    $middleware->append(\Erikgreasy\FilamentRedirects\Http\Middlewares\RedirectMiddleware::class);
})

// eg. app/Providers/Filament/AdminPanelProvider.php

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(new \Erikgreasy\FilamentRedirects\FilamentRedirectsPlugin());
}
bash
php artisan migrate