PHP code example of oobook / post-redirector
1. Go to this page and download the library: Download oobook/post-redirector 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/ */
oobook / post-redirector example snippets
Route::get('/old-url', function () {
$data = [
'name' => 'John Doe',
'email' => '[email protected]',
];
return redirect()
->toWithPayload('/new-post-url', $data)
});