WordPress is one of the most popular open source applications and that means many people are comfortable using its admin to manage their site. There are times when building out a site this is advantageous as it prevents you from having to retrain the user on how to manage content, menus, photos, and more. A popular way of setting up a site like this is to use WordPress as the admin and then build out the frontend in a framework such as Laravel. Let’s take a look some packages that make working with WordPress easy:
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.
WordPressToLaravel
WordPressToLaravel syncs data from a wordpress.com blog. It’s designed to run as a scheduled cron job through Laravel Scheduler. Then it will automatically download and import #wordpress #smallbusiness #entrepreneur
https://managewp.org/articles/11553/wordpress-backend-and-laravel-for-frontend
No comments:
Post a Comment