Laravel News: How to use WordPress as a backend for a Laravel Application

The Laravel News site has posted an interesting tutorial where they describe the use of WordPress as a backend for a Laravel application. This setup is based on the Laravel News‘ own experience with it in the recent refactoring of the site.

Last week I relaunched Laravel News, and the new site is running on Laravel with WordPress as the backend. I’ve been using WordPress for the past two years, and I’ve grown to enjoy the features that it provides. The publishing experience, the media manager, the mobile app, and Jetpack for tracking stats.

I wasn’t ready to give these features up, and I didn’t have the time to build my own system, so I decided to keep WordPress and just use an API plugin to pull all the content I needed out, then store it in my Laravel application. In this tutorial, I wanted to outline how I set it all up.

While he did find other methods for linking the two, they didn’t quite fit with what he wanted so he worked up his own. The content is then synced via a recurring task pulling over posts, categories and tags. He gets into the WordPress REST API first, showing the extraction of the posts from the API and pushing them into a Laravel collection. There’s also an example of how to sync a post with the database (API) and how to create a new post in a similar way. Also included is the code to get the featured image, get the category for a post and sync the tag values. The tutorial finishes with the code for the sync command and pushing it into the scheduler.

PHPDeveloper.org

Site News: Blast from the Past – One Year Ago in PHP (07.21.2016)

Here’s what was popular in the PHP community one year ago today:

  • Easy Laravel Book: How Laravel 5 Prevents SQL Injection, CSRF, and XSS
  • Barry vd. Heuvel: OAuth in Javascript Apps with Angular and Lumen, using Satellizer and Laravel Soci
  • Remi Collet: New „remi-php70“ repository
  • Simon Holywell: International PHP dates with intl
  • Andrew Embler: Creating a Z-Ray Plugin for Zend Server 8.5
  • Freek Van der Herten: Speed up a Laravel app by caching the entire response
  • Lorna Mitchell: Test Your PHP Application on PHP 7
  • Sameer Borate: Cron Expression Parser in PHP
  • Paragon Initiative: Implementing Secure User Auth in PHP Applications with Long-Term Persistence
  • Simon Holywell: PHP date localisation with setlocale
  • NetTuts.com: Understand Overriding in Magento: Controllers
  • Rob Allen: Custom OAuth2 authentication in Apiiglity
  • BitExpert Blog: Think About It: PHP/PostgreSQL Bulk Performance (Part 3)
  • SitePoint PHP Blog: Defensive Programming in PHP
  • MyBuilder Tech Blog: Insertion, Removal and Inversion Operations on Binary (Search) Trees in PHP
  • Facebook HipHop Open Source Blog: Under the hood: Box’s HHVM migration
  • Tideways.io: 5 Ways to optimize Symfony Baseline Performance
  • SitePoint PHP Blog: Validating your data with Respect Validation
  • Matthew Setter: PHP South Coast 2015
  • Voices of the ElePHPant: Interview with Jacques Woodcock

    PHPDeveloper.org

  • Site News: Popular Posts for This Week (06.10.2016)

    Popular posts from PHPDeveloper.org for the past week:

  • Jordi Boggiano: PHP Versions Stats – 2016.1 Edition
  • TutsPlus.com: Using the Mailgun Store(): A Temporary Mailbox for Your App’s Incoming Email
  • Davey Shafik: The Syntax of Tech Communities
  • Liip Blog: Testing in the Cloud – Using Bamboo with Amazon AWS
  • Cees-Jan Kiewiet: Run GrumPHP git hooks within Vagrant
  • SitePoint PHP Blog: Composer Global Require Considered Harmful?
  • QaFoo Blog: How to Refactor Without Breaking Things
  • SquizLabs: Analysis of Coding Conventions
  • Freek Van der Herten: Building a dashboard using Laravel and Vue
  • PHP Roundtable: 045: A php|tek 2016 Special

    PHPDeveloper.org

  • Laravel News Podcast: Episode #17 – Laravel Echo, Laravel Valet, and PHP-FIG implosion

    The Laravel News site has posted the latest episode of their podcast covering Laravel Echo, Valet and the PHP-FIG "implosion".

    In this twenty-two minute episode, we talk about Laravel Echo and new changes to Laravel Valet.

    You can listen to this latest episode either through the in-page audio player or by downloading the mp3 of the show for offline listening. If you enjoy the show and want to hear more, be sure to subscribe to their feed and get the latest as they’re released.

    PHPDeveloper.org

    Community News: ZendCon 2016 Call for Papers Opens

    The ZendCon conference has just announced the opening of the Call for Papers for their 2016 event. The conference will once again be happening at the Hard Rock Hotel and Casino in Las Vegas, Nevada in October (18th-21st).

    We’re pleased to announce the ZendCon 2016 PHP Conference, the most anticipated PHP centric event of the year, where community and enterprise PHP developers from around the world gather to share and learn the latest hot trends and technologies in today’s professional PHP development.

    We know speakers are key to the success of a conference and hope you will submit a talk. In appreciation for the efforts provided, our speakers package ensures they will not need to worry about anything other than delivering the best talks.

    They’re not just looking for PHP topics either. They’ll consider a wide range of topics including PHP frameworks, devops, source control, continuous delivery and many more. The Call for Papers ends May 31st, 2016 so be sure to get those submissions in early (and often) before time runs out.

    PHPDeveloper.org

    Laravel News Podcast: Episode #13 – Chrome Extension for Tests, Jigsaw, Fixing MySQL Memory & More

    The Laravel News Podcast has released their latest episode, Episode #13 hosted by PHP and Laravel community member Eric L. Barnes.

    In this episode, we talk about Laravel Exception Reporter, Chrome Bandwidth limiter, Chrome extension to generate Laravel tests, Jigsaw, Helpspot Vault, Fixing MySql Memory, Sparkwatch, and Taxes.

    You can listen to this latest episode either using the in-page audio player or by subscribing either through iTunes or their RSS feed.

    PHPDeveloper.org

    Laravel News: Laracon US Schedule Announced

    The Laravel News site has a new post today sharing the full schedule announcement for this year’s Laracon conference (happing in Louisville, Kentucky July 27th through the 29th).

    Laracon just announced the preliminary schedule for this year’s conference. Just as in the past, it leaves ample time for hanging out and meeting others interested in the framework.

    Sessions for this year’s conference include:

    • "Test Driven Laravel" (Adam Wathan)
    • "Servers For Hackers" (Chris Fidao)
    • "PHP 7" (Zeev Suraski)
    • "Tests Should Tell A Story" (Matthew Machuga)
    • "YAGNI With Laravel" (Jason McCreary)
    • "Lumen, Guzzle, & Swagger" (Jeremy Lindblom)

    You can find more information about the conference and pick up tickets from the main conference website. There are discounts available for groups of 3 or more too.

    PHPDeveloper.org

    Site News: Blast from the Past – One Year Ago in PHP (03.17.2016)

    Here’s what was popular in the PHP community one year ago today:

  • NetTuts.com: Design Patterns: The Command Pattern
  • Scotch.io: S.O.L.I.D: The First 5 Principles of Object Oriented Design
  • PHP.net: Release of PHP 5.6.7, 5.5.23 and 5.4.39
  • PHP Town Hall Podcast: Episode 39: Hi Josh!
  • Piotr Pasich: Ant, composer and code quality tools
  • php[architect]: March 2015 Issue Released – DB Migration
  • ServerGrove Blog: Symfony2 components overview: Stopwatch
  • Larvel News: Laravel Podcast (Host and Format Change)
  • stfalcon.com: Increasing project productivity in Symfony2 from Doctrine2 ORM
  • SitePoint PHP Blog: Use Laravel Contracts to Build a Laravel 5 Twig Package
  • PHP Roundtable: 015: SemVer, Licensing & OS Support Expectations
  • SitePoint PHP Blog: User Authentication in Symfony2 with UserApp.io
  • Voices of the ElePHPant: Interview with Evan Coury and Chris Hartjes
  • Phil Sturgeon: PHP 7 Feature Freeze
  • Matthew Weier O’Phinney: PSR-7 is in Voting Stage!
  • SitePoint PHP Blog: How to Use GitHub’s API with PHP
  • Sameer Borate: Create a quick REST API using Slim framework

    PHPDeveloper.org

  • Laravel News: Laravel: Up and Running Available for Preorder

    If you’re interested in the Laravel framework and possibly using it for your upcoming projects but aren’t sure where to start, you should consider checking out Matt Stauffer’s upcoming O’Reilly book "Laravel: Up and Running". According to this post on the Laravel News site the book is now available for pre-order.

    Matt Stauffer has been writing a new book on Laravel named Laravel: Up and Running: A Framework for Building Modern PHP Apps and it’s published by O’Reilly Media. […] This first edition is 250 pages and will come in either paperback or ebook form, but this current preorder is only available in paperback. Based on Amazon the expected shipping date is August 25, 2016.

    The book walks you through the creation of a Laravel application from start to finish. it’s no meant as a reference but a "work book" to teach the foundations of the framework. It hopes to provide a single point where developers, especially those familiar with "C-family programming languages", will be able to get started quickly.

    PHPDeveloper.org