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

O'Reilly Web Development Blog:
On becoming a web artisan
Dec 07, 2016 @ 12:20:39

The O'Reilly Web Programming blog recently posted an interview with Matt Stauffer, the author of their recently published Laravel: Up & Running book. In the interview Matt talks about becoming a "web artisan" and offers some advice you could apply to your own development work.

I recently asked Matt Stauffer, Partner and Technical Director at Tighten Co. to discuss his work with the Laravel community, including what makes the PHP framework great for rapid application development and how it interoperates with new and emerging frontend tooling. Matt is also the author of Laravel: Up and Running, which O'Reilly published in November 2016.

Matt answers questions about the Laravel framework (why it's for "web artisans"), using it for prototyping, upcoming features he's excited about and advice he has for those just starting out in web development. Check out the full post for the answers to these and other questions.

tagged: interview mattstauffer oreilly laravel questions

Link: https://www.oreilly.com/ideas/on-becoming-a-web-artisan

Laravel News:
Route improvements are coming to Laravel 5.4
Dec 07, 2016 @ 10:12:31

The Laravel News site has a quick new post about some routing improvements that are coming in the next larger release of the framework , Laravel v5.4:

As Laravel 5.4 development continues, two new improvements are coming to your routes, better route caching for large applications and fluently registering routes.

The route caching updates will help performance with larger applications, reducing the parsing time required to locate and push a request to the right location. The "fluent" route improvements basically allow for the definition of some things, like middleware or route names, as a part of the route definition rather than after the fact. Examples of this are included in the post.

tagged: laravel routing improvement v54 cache fluent registration

Link: https://laravel-news.com/route-improvements

Laravel News:
Laravel Homestead 4.0 is released featuring support for PHP 7.1
Dec 06, 2016 @ 09:43:35

The Laravel News site has a new post announcing the release of the latest version of Laravel Homestead, the Vagrant-driven environment that makes it easy to set up a Laravel environment. In this latest version, 4.0, there's a few changes including a major one: support for PHP 7.1.

Laravel Homestead the Vagrant box for easily running Laravel on any platform has just released v4.0 that includes support for the just released PHP 7.1.

The upgrade is easy but the instructions do vary depending on how you have it installed.

They walk you through the steps for the upgrade:

  • Backup all your Homestead databases
  • update the Homestead Global installation (or per-project installation)
  • Destroy the current Vagrant box
  • Use "vagrant up" to download the latest version and bring the box back up

It's a pretty easy process that should be pretty painless. Everyone's setup is slightly different so there might be a few issues in your own upgrade and minor version releases will be made if there are issues because of the upgrade.

tagged: laravel homestead vagrant upgrade v4 release php71 support

Link: https://laravel-news.com/laravel-homestead-4-0-is-released-featuring-support-for-php-7-1

Laravel News:
Changes coming to the Laravel release cycle
Dec 05, 2016 @ 09:20:35

On the Laravel News site there's an announcement posted about a change in the Laravel release schedule, an update from the original 2013 announcement.

Yesterday, Taylor announced on Twitter that this is going to be changing to a January and July cycle, pushing each release out a month from its current schedule.

This has two primary advantages for the development team and the first is it allows more time for testing after Symfony’s release. The second advantage is it’ll better coincide with Laracon, the yearly Laravel conference.

This means a bit of a delay on the release of the next major version of the framework (v5.4) but only by one month. The six month cycle will then resume after that slight delay. You can find out more about the remainder of the release cycle in the original post based on Taylor's comments at Laracon 2013.

tagged: laravel release cycle update taylorotwell delay symfony laracon

Link: https://laravel-news.com/release-cycle-changes

Laravel News:
Review of Test-Driven Laravel
Dec 02, 2016 @ 10:44:56

The Laravel News site has posted a review of "Test Driven Laravel", a course from Adam Wathan walking you through the creation of a Laravel-based application from a completely Test-Driven Development approach.

I’ve been programming for close to a decade, and I’m constantly trying to find ways so to improve my skill set to be able to keep up with the ever-changing landscape of technology. The one area I’ve always wanted to improve in has been testing. [...] When Adam announced at Laracon that he was creating a course on building real-world applications with TDD, I was really excited to see where it would go.

Over the past couple of months, I’ve been lucky enough to preview the course as the lessons get finished. It’s been really helpful because I’ve been working on a large, complex application, and I’ve been able to apply the things I’m learning immediately in my day-to-day work.

The review goes on to talk about some of the things they've learned already from the course including test coverage for parts of the app that work with 3rd party services. They link to this talk from Adam as an example of some of the concepts taught in the course and, of course, a link where you can purchase your own Early Access pass and start learning.

tagged: review earlyaccess testdriven laravel tdd adamwathan testing course

Link: https://laravel-news.com/review-of-test-driven-laravel

Laravel News:
Quickly Dumping Laravel Queries
Nov 28, 2016 @ 12:49:36

The Laravel News site has a quick post today with a helpful hint for those trying to track down exactly what queries their Laravel application is performing on database calls. In this post they show two ways to get this information - one using the Debugbar and the other with a quick script.

When you are building an application and utilizing Eloquent it’s very easy to hit the N+1 problem. This is where you select a model and then later use lazy loading to fetch child records.

They give an example of selecting a user, grabbing it's list of "posts" and then looping through them causing queries to fire for each post individually. A fix for it is using the "with" method to pre-load them but determining this could be tricky. Enter their two solutions: the Laravel Debugbar package and this quick script shared by magkopian that listens for a "kernel.handled" event and outputs the results of the "getQueryLog" method with the Laravel "dd" helper.

tagged: laravel dump queries debugbar debugging sql database tip

Link: https://laravel-news.com/2016/11/quickly-dumping-laravel-queries/

Laravel News:
Getting started with Watson Personality Insights
Nov 25, 2016 @ 14:52:01

On the Laravel News site there's a post showing an application of the IBM Watson Personality Insights service to discover trends and make predictions about future actions/preferences. They also show how to integrate it into your Laravel-based application thanks to this package.

One of the most important things as a business owner is being able to understand your customers’ needs and wants; such that you are able to offer them a personalized experience. This works great if you know your customers on a personal level, but what if you don’t?

[...] Sure you could send out a survey from your site, then collect a huge amount of data, then process, analyze and finally being able to tell what package fits which user. This seems tiresome and plus people’s tastes and preferences change over time and you would have to repeat this process over and over again each time you want to offer them something new. There has to be a better way, and there is.

The post talks about the services offered by IBM Watson and, more specifically, about Personality Insights. They cover some about what this service offers as related to web preferences and link to a demo application you can use to get more context about its handling. The post wraps up showing how to integrate the package into your application and working with requests/responses to the IBM Watson Personality Insights service.

tagged: ibmwatson personality insights tutorial laravel package machinelearning

Link: https://laravel-news.com/2016/11/getting-started-with-watson-personality-insights/

Joe Ferguson:
Use Laravel Shift for your next upgrade
Nov 24, 2016 @ 09:13:23

In this new post to his site Joe Ferguson takes a look at Laravel Shift, an automated service that makes it easier to upgrade your Laravel-based application quickly.

I’ve had an eye on LaravelShift.com since it first made it’s way across my twitter feed some time ago. I’ve also had the pleasure of meeting and talking with it’s creator Jason McCreary at a few conferences over the past year. I think it’s really awesome when community members are able to take a product to market that not only scratches their own itch, but can provide value to the rest of the community as well.

[...] I built NerdsAreDrinking on Laravel 5.1 because that was the current version at the time. We have seen two more release since: 5.2 and 5.3. The upgrade process isn’t terrible however there is a lot you may need to take into account. Rather than upgrade from 5.1 to 5.2 and then 5.2 to 5.3 I decided to use Laravel Shift to do the 5.1 to 5.2 upgrade for me.

Joe then talks some about his experience using the service and was impressed at the speed of the service to create the required Pull Request for the update. He includes a link to the PR so you can see what the upgrade looks like too. He feels like the money spent (around $11 USD) was well invested and would definitely use the service again.

tagged: laravel laravelshift upgrade opinion service version

Link: https://www.joeferguson.me/use-laravel-shift-for-your-next-upgrade/

Deployer Blog:
How to deploy Laravel application
Nov 22, 2016 @ 12:39:30

In a new post to their blog the Deployer project (a PHP-based deployment tool) has shared a quick tutorial about deploying Laravel applications using the tool and just a few simple commands.

Apparently you already have some Laravel application and some server or shared hosting. Now you need to automate the process of deployment. Deployer will helps you in this as it ships with some ready to use recipes for Laravel based application.

They start with the details about installing the tool then share the single "dep init" command to create the deployment configuration needed to deploy a default Laravel application. There's a few modifications you'll need to make for your own project (like repository location, server information and the path to your SSH key) but that's basically it. The "dep deploy" command can then be used to push the release to the remote server in a "current" directly ready and waiting for your web server to serve up.

tagged: deployer deployment tool tutorial laravel application setup

Link: https://deployer.org/blog/how-to-deploy-laravel

Laravel News:
Laravel 5.4: JSON Based Language Files
Nov 22, 2016 @ 09:44:33

The Laravel News site has a new post today describing a feature of the upcoming Laravel 5.4 release: the ability to define language files with JSON formatted files.

One of the most wanted requests we receive at Laravel is introducing better support for multilingual web applications, there are already packages out there that add some nice functionality to Laravel for better handling of multilingual projects requirements, but one of the painful issues when building such applications is managing translation keys.

Previously the trans/trans_choice helper to reference the value defined in the PHP array from your language files by a key name. With this new functionality, a new __() helper method is defined that will look through the English translation file, locate the correct key and find the matching record in the requested language to return. They also show how to pass in some parameters into the translator and how to use it directly from Blade.

tagged: laravel json language file helper tutorial parameter blade

Link: https://laravel-news.com/2016/11/json-based-translations/