PHP code example of leeovery / wordpress-to-laravel

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

    

leeovery / wordpress-to-laravel example snippets

 php
LeeOvery\WordpressToLaravel\WordpressToLaravelServiceProvider::class,
 bash
$ php artisan migrate
 php
    
    global $wp;
    $url = str_replace('blog.', '', home_url() . '/blog/' . $wp->request);
    wp_redirect($url, 301);
    die();
    
 php
    
    function redirection_theme_change_view_link($permalink)
    {
        $url = str_replace('blog.', '', env('WP_HOME') . '/blog');
    
        return str_replace(env('WP_HOME'), $url, $permalink);
    }
    add_filter('post_link', 'redirection_theme_change_view_link');