Playing around WordPress with Laravel Eloquent and MVC

The WordPress code is commonly known as messy and not the best practice, I've found some packages/libraries that can empower WordPress with MVC or at least deacent ORM.

Have fun.

WordPress Corcel

Corcel uses Laravel Eloquent models to manage retrieving content directly from your WordPress database. Once installed you can use the same comfortable syntax you are used to:

// All published posts
$posts = Post::published()->get();
$posts = Post::status('publish')->get();

// A specific post
$post = Post::find(31);

It includes support for posts, post types, taxonomies, pages, categories, and attachments. The one downside is the package is still under development.

Link: https://github.com/jgrossi/corcel

 

WordPlate

WordPlate is a modern WordPress stack which tries to simplify the fuzziness around WordPress development. Using the latest standards from PHP. WordPlate utilizes WordPress as its dependency through Composer.

Link: https://github.com/wordplate/wordplate

 

Themosis - A MVC framework for WordPress developers.

Build custom websites and applications with WordPress.

themosis A MVC framework for WordPress developers. Build custom websites and applications with WordPress.

 

Link: http://framework.themosis.com/

 

Reference: https://laravel-news.com/2016/01/wordpress-and-laravel/