PHP code example of intelfric / laravel-encrypted-route
1. Go to this page and download the library: Download intelfric/laravel-encrypted-route 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/ */
intelfric / laravel-encrypted-route example snippets
// Redirect to original URL (user sees original URL)
'redirect_to_original' => true,
// Dispatch internally (user stays on encrypted URL)
'redirect_to_original' => false,
// URLs expire after 1 hour by default
'default_expiry_minutes' => 60,
// No default expiry
'default_expiry_minutes' => null,
// Only allow specific routes
'allowed_routes' => [
'user.dashboard',
'admin.panel',
],
// Prevent specific routes from being encrypted
'excluded_routes' => [
'login',
'register',
'password.reset',
],