Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

TutsPlus.com:
Dynamic Page Templates in WordPress, Part 3
Jun 19, 2017 @ 10:45:04

The TutsPlus.com site has posted the third part of their "Dynamic Page Templates in WordPress" tutorial series today. In this latest article author David Gwyer finishes off the series using all that they've shared from part one and part two to create two examples.

In the first two parts of this tutorial series, we covered what dynamic page templates were and why they were needed. We also looked at the code required to implement them.

In this third and final tutorial in the series, I'll be creating two examples of fully working dynamic page templates you can use in your own projects. These were specifically chosen to be easily extendable to suit your own needs, and are intended as inspiration for any other type of dynamic page templates you can think of.

He then walks you through the creation of the two page templates: a Simple Contact Form and a Blog Post Archive. The first allows you to dynamically control the form elements for a UI interface (rather than code) and the second uses dynamic data to display the list of previous blog posts. The tutorial then finishes with a look at how, since WordPress 4.7, you can use dynamic page templates with any kind of post, not just pages.

tagged: wordpress series part3 dynamic page template blog archive simple form tutorial

Link: https://code.tutsplus.com/tutorials/dynamic-page-templates-in-wordpress-part-3--cms-28514

Scotch.io:
User Authorization in Laravel 5.4 with Spatie Laravel-Permission
May 16, 2017 @ 11:28:09

On the Scotch.io site a new tutorial has been posted showing you how to use the Laravel-permission package (from Spatie) to more easily handle permission setup and validation in a Laravel application.

When building an application, we often need to set up an access control list (ACL). An ACL specifies the level of permission granted to a user of an application. For example a user John may have the permission to read and write to a resource while another user Smith may have the permission only to read the resource.

In this tutorial, I will teach you how to add access control to a Laravel app using Laravel-permission package. For this tutorial we will build a simple blog application where users can be assigned different levels of permission.

The tutorial then walks though the installation of the package and some of the new tables it adds to the database when you run the included migrations. It then talks about some of the methods that can be used, both on the backend and in Blade templates, to evaluate if the current user has the roles required. Next up is the creation of the controllers to handle the basic CRUD tasks and working with the blog posts and views to set up the permissions and roles. Finally the tutorial shows the code required to evaluate the roles and permissions of the user and an example of middleware that performs a pre-check to see if a user even has access to manage various pieces of the application.

tagged: tutorial spatie permission role package introduction blog acl ui interface

Link: https://scotch.io/tutorials/user-authorization-in-laravel-54-with-spatie-laravel-permission

Stoyan Stefanov:
HTTPS migration: a WordPress blog hosted on Dreamhost
Jan 09, 2017 @ 09:17:27

Stoyan Stefanov has written up a post sharing the process he followed to migrate a WordPress blog to HTTPS on the Dreamhost hosting service.

Now some folks reminded me recently that the Perf calendar was not yet migrated to HTTPS... True enough. I have to do it. Eventually. In any normal situation I'll procrastinate indefinitely, but since I had more pressing things to do and "Anyone can do any amount of work, provided it isn’t the work he is supposed to be doing at that moment"... I bit the bullet.

Below are the steps that worked for me with a WordPress blog, hosted on DreamHost. The steps are still relevant to any WordPress site, just using Dreamhost as an example and since Dreamhost makes many of the steps easy.

He breaks the process down into six parts, including a bit of testing at the end:

  • Setup free SSL certificate thanks to Let's Encrypt
  • Backup all the things (or just the blog's database or just the table with the posts)
  • Search and replace internal references (images and links) WP settings
  • Redirect http to https permanently in .htaccess
  • Test/tweak?

Each step comes with the code or configuration you'll need to set up HTTPS and some screenshots where necessary, like with the Let's Encrypt setup.

tagged: wordpress migrate https blog dreamhost letsencrypt tutorial

Link: http://www.phpied.com/https-migration-wordpress-blog-dreamhost/

Toptal.com:
Don't Hate WordPress: 5 Common Biases Debunked
Dec 29, 2016 @ 12:10:30

On the Toptal.com site author Donald Mudenge has written up a post that wants to help debunk the top 5 WordPress myths that are still floating around about this popular and common tool.

In the early days, people used WordPress only as a blogging tool. However, today WordPress covers more than 50 percent of the market share for CMSs, supporting nearly 60 million websites worldwide.

As a commonly used platform for building websites and other online applications, misconceptions have spread like a forest fire, keeping people away from WordPress. In this article, I outline and explain the five most common WordPress taboos and myths, clarify them and offer solutions on how to overcome them.

The five myths he tries to dispel are:

  • WordPress is significantly more likely to be hacked.
  • WordPress is just blogging software.
  • WordPress professionals are designers.
  • WordPress isn’t an enterprise solution.
  • One WordPress requires one database.

For each item on the list he includes a brief summary of what's usually said about the myth and corrects it with his own description and links to other resources helping to prove his point.

tagged: wordpress myths debunk top5 common hacked blog enterprise database

Link: https://www.toptal.com/wordpress/debunking-wordpress-myths

SitePoint PHP Blog:
8 Must-Have Grav Plugins to round-off Your Blog’s Installation
Aug 08, 2016 @ 10:22:52

On the SitePoint PHP blog there's a new post from editor Bruno Skvorc sharing his list of top 8 plugins for Grav he sees as "must haves". Grav is a flat-file based content management system that uses modern PHP practices such as Composer packages, Makdown for content and YAML for configuration.

I recently switched my blog over from Blogger to Grav, and while quite a nifty platform on its own, Grav really shines once you prop it up with some custom themes and plugins.

This post will list the plugins I believe to be essential for a developer’s personal blog, and the reasons behind each suggestion.

Among the plugins on his list are options like:

He includes examples of what the output of each looks like when integrated into the site and how to get them installed and configured. Check out the remainder of the post for more in his list of suggestions.

tagged: grav plugin blog installation example top8 list

Link: https://www.sitepoint.com/8-must-have-grav-plugins-to-round-off-your-blogs-installation/

Laravel News:
Laracon US Day 2 Live Blog
Jul 28, 2016 @ 11:55:06

Today is Day 2 for this year's Laracon US conference and the Laravel News site has posted their livestream of the event. Yesterday's sessions and announcements were chronicled in the Day 1 post if you'd like to catch up.

Welcome to day two of the Laracon Conference. This is the live blog for today’s talks.

The sessions have already started, so there's already updates (just in case you're not already watching the live stream). You can check out the sessions coming up today over on the main conference schedule.

tagged: laraconus16 live blog laracon laravelnews day2

Link: https://laravel-news.com/2016/07/laracon-us-day-2-live-blog/

Laravel News:
Laracon Live Blog Day 1
Jul 27, 2016 @ 10:10:33

For those that can't make it to this year's Laracon US event, the Laravel News site has started up a live stream for each of the days you can use to catch the latest from each session and announcement made at the conference. Today is the first day of the conference, so the Day 1 stream is already up and going strong.

Welcome to day one of Laracon US. Today features three workshop talks and we will be live blogging each one here.

There's no need to reload as the stream is a live update so keep it up and keep track of all of the Laracon-related happenings through out the day. For more information about the sessions being presented each day, check out the full schedule on the main conference website.

tagged: laraconus16 live blog laracon laravelnews

Link: https://laravel-news.com/2016/07/laracon-live-blog-day-1/

TutsPlus.com:
The Repository Pattern in Laravel 5
Mar 15, 2016 @ 12:50:05

The TutsPlus.com site has posted a tutorial covering the use of the repository design pattern in Laravel, a popular PHP framework. While the article does introduce some of the basics of the design pattern, a bit more research may be in order if you're not familiar with its base concepts.

The repository pattern was introduced for the first time by Eric Evans in his Domain-Driven Design book. The repository is, in fact, the entry point for the application to access the domain layer.

To put it simply, the repository allows all your code to use objects without having to know how the objects are persisted. The repository contains all the knowledge of persistence, including mapping from tables to objects. This provides a more object-oriented view of the persistence layer and makes the mapping code more encapsulated.

In this article they replace the default storage/persistence method for database records away from the default Eloquent over to Doctrine, a widely used ORM tool. The start with a brief comparison between Eloquent and Doctrine before starting on on a simple "blog" application. They connect Doctrine to Laravel via an "entity manager" and make a basic Doctrine-based model for the Posts and a matching repository/controller implementation. All the code you'll need to implement it is included along with a simple view to take in the post content and display errors if there were any on the save.

tagged: repository designpattern laravel tutorial doctrine eloquent blog

Link: http://code.tutsplus.com/tutorials/the-repository-pattern-in-laravel-5--cms-25464

Community News:
PHP 7 Has Arrived (and Everyone's Talking About It)
Dec 04, 2015 @ 09:58:09

The big news in the PHP ecosystem is the release of the stable version of PHP 7.0.0. This was officially released late yesterday and the response has already been great. Members of the PHP community (and some companies) have also posted about the release too:

These also come along with a whole host of tweets about the PHP 7 release too. If you have a post you'd like to have added to this list and I've just missed it, let me know and I'll drop it in!

tagged: community article blog feedback php7 twitter

Link: http://phpdeveloper.org

Alfred Nutile:
Laravel Training: The Laravel Maven and the Laravel Novice
Nov 11, 2015 @ 11:09:22

Alfred Nutile has posted information about a series of Laravel-related training videos that aim to help you go from "Laravel 0 to Deploy" as they walk you through the creation and deployment of a simple blog based on the Laravel framework features.

The two of us come together in this raw footage of building a Blog in Laravel. You get both the insights of an experienced Laravel Software Writer (Alfred Nutile) and the questions of a WordPress developer new to Laravel, (Joe Bacal)

As of the time of this post there's four episodes in the series with more planned:

Other topics to come include working with Homestead, managing Gulp dependencies, creating a contact form and working with single page applications.

tagged: laravel training screencast introduction beginner video series blog application

Link: https://alfrednutile.info/trainings/laravel