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

CloudWays Blog:
“The Biggest Improvement In Our Ecosystem Is The Composer” Proclaims Laravel Develop
Apr 27, 2016 @ 12:31:59

The CloudWays blog has posted their latest interview with a member of the PHP community. In this new article they talk with Freek Van Der Herten.

Freek is a Laravel enthusiast and a PHP developer. Also, he has been writing on his blog. He is a developer at Spatie. He lives in Belgium and is a Zend Certified Engineer. He was a speaker at the “Uncon” of PHP Benelux conference 2016.

In the interview Freek answers questions about:

  • How he originally got into computers/programming
  • His opinions on the Laravel ecosystem
  • His views on the overall PHP community growth
  • The web development competition in Belgium

There's also a bit about his own hobbies and interests including music, writing articles for "P-Magazine" and reading up on the latest in programming blogs. You can read the full interview with answers to these and many more questions here.

tagged: cloudways interview freekvanderherten laravel community

Link: http://www.cloudways.com/blog/freek-van-der-herten-interview/

Matt Stauffer:
Using SparkPost for Transactional emails with Laravel
Apr 27, 2016 @ 10:54:42

Matt Stauffer has a post to his site for the Laravel users out there wanting to seed "transactional emails" from their applications. In this tutorial he shows you how to use the SparkPost service to send emails with very little effort.

Recently, Mandrill announced that they'd be sunsetting their transactional email service and instead rolling it in to a secondary service for paid MailChimp users. That's fine for them, but many of us were using it for small one-off apps and weren't interested in all of a sudden paying money to send 100 emails a month.

[...] But right when Mandrill announced their pricing change, a new transactional email provider came out of nowhere: SparkPost. [...] So let's walk through the process of signing up and moving Giscus, my app for notifying you of comments on your gists, from Mandrill to SparkPost.

First he walks you through the process of getting a SparkPost account set up and configured to receive messages from your application. He then moves over to the Laravel side, upgrades his installed version and configures it with the "secret" value SparkPost provides and changes the MAIL_DRIVER value - that's basically it.. He also includes some screenshots of other parts of the SparkPost admin interface to show some of the other functionality included.

tagged: tutorial laravel sparkpost service transaction email send

Link: https://mattstauffer.co/blog/using-sparkpost-for-transactional-emails-with-laravel

Voices of the ElePHPant:
Interview with Taylor Otwell about Spark
Apr 21, 2016 @ 11:47:36

In the latest episode of the Voices of the ElePHPant podcast host Cal Evans talks with Taylor Otwell, creator of the Laravel framework about Spark, the Laravel-based package that provides many of the basic features needed to run the business around your application.

Cal and Taylor start off talking about why Taylor wanted to create Spark and where the need came from in his own development work. He wanted to share the results and make it faster for people to work on the application and not these features around it. They also talk about some of the features that are included in Spark and why they exist. There's also a discussion about why he chose to go with Vue.js for the frontend of the application, the user impersonation feature and

This is a live video interview that Cal did with Taylor you can watch either through the in-page audio player or directly over on YouTube. If you enjoy the interview be sure to follow their feed and keep up with them on Twitter.

tagged: voicesoftheelephpant community interview taylorotwell podcast spark laravel

Link: https://voicesoftheelephpant.com/2016/04/20/interview-taylor-otwell/

Tighten.co:
Introducing Jigsaw, a Static Site Generator for Laravel Developers
Apr 20, 2016 @ 13:33:40

On the Tighten.co blog there's a new post introducing Jigsaw, a static site generator for Laravel developers they've created in the course of their own work.

That's right, Tighten has created a Laravel-based static site generator named Jigsaw, and we think it's pretty great.

Before I write another line of this post, I want to address the looming question: Why create another static site generator? In PHP alone there are two, and since we soft-launched Jigsaw there's already been another Blade-based static site generator launched.

The first part of the article lists three reasons for making the tool, pointing out the ecosystem they used (different from others), the focus on Laravel developers and the easy transition from a Jigsaw site to a full Laravel one. From there the post talks about what Jigsaw is and how you can get started using it (installation and configuration guide included). It also includes examples of "first pages" to help you get started and the result. The post finishes with a look at variable handling, custom front matter values, deployment and how to convert the site from Jigsaw to Laravel should the need arise.

tagged: jigsaw static site generator laravel introduction installation tutorial

Link: http://blog.tighten.co/introducing-jigsaw-a-static-site-generator-for-laravel-developers

TutsPlus.com:
What Are Laravel Exceptions?
Apr 18, 2016 @ 12:25:35

In a new tutorial posted on the TutsPlus.com site they get into some detail about what exceptions are in Laravel-based applications, when to use them and how to make your own.

As a PHP developer, you may use exceptions, because they allow you to notice when something has gone wrong or the user has acted in an unusual way (such as division by zero). Without exceptions, your application would end up presenting unwanted errors and being much more difficult to debug. It is also important that you halt execution immediately and take another course of action.

Exceptions are really simple, and they will make your development progress easier. When you learn how to use exceptions, this will be a usual part of your development.

They start by explaining what exceptions are (in the strictest sense, a definition from Martin Fowler) and an example of how one is caught in PHP. They briefly talk about when to use exceptions and how they're implemented in Laravel. The post finishes with a look at creating your own exception types and where to place them in your application. They also make the suggestion of using the Assertion package to verify data and catch the AssertionFailedException if there's an issue.

tagged: laravel exception example tutorial overview usage

Link: http://code.tutsplus.com/tutorials/what-are-laravel-exceptions--cms-25816

Adam Wathan:
Cleaning Up Form Input with Transpose
Apr 15, 2016 @ 11:50:34

Adam Wathan has a post on his site showing you how to use "transpose" functionality to clean up form input, transforming a set of arrays from submitted data back into a better structure.

Transpose is an often overlooked list operation that I first noticed in Ruby. The goal of transpose is to rotate a multidimensional array, turning the rows into columns and the columns into rows.

In his example, he adding multiple "contacts" at once. He shows the difficulties with this, the form structure and the data returned. There's several formats that could be returned but none are the correct structure to push into a model (his examples are in Laravel there's a generic array_map example too) He shows how to update the Laravel collection handling using a custom macro, transpose, to handle the array_map functionality in a more self-contained way. He includes the code to make the macro work and an example of it in use to correctly format his incoming contact data into something he can use in his collection.

tagged: transpose laravel collection array data format arraymap

Link: http://adamwathan.me/2016/04/06/cleaning-up-form-input-with-transpose/

Community News:
Laravel Spark Site Launched (and Screencast Posted)
Apr 15, 2016 @ 10:12:25

A highly anticipated project in the Laravel community - Laravel Spark - has officially launched its site providing more information about the product and its upcoming release. Laravel News gives its own brief summary of Spark in a new post:

Spark is a complete scaffolding for building a SaaS app including authentication, password reset, billing plans, payment method updates, invoices, coupons, user impersonation, and more with support for Stripe and Braintree.

The official release date is April 19th, next Tuesday, and although no pricing is on the site the rumor is it’ll be less than $100. This will save you many hours from building it all yourself.

For those interested in finding out a bit more in-depth about the product, check out this recently released screencast over on the Laracasts site where Taylor Otwell shows the basic setup and features of the platform.

tagged: laravel spark platform screencast laracasts release website

Link: https://spark.laravel.com/

Jeff Madsen:
Using Faker to seed dummy data for Laravel application
Apr 13, 2016 @ 12:07:18

Jeff Madsen has a quick post to his site showing how to use Faker to populate data in Laravel directly in the framework's generated "seeders".

Hello, Mr. asdfgh qweefg! Welcome to kgjhjgjh! Thank you. Only the name's not "asdfgh qweefg".

Sorry! It's just easier.. You're always showing everyone on Laravel Quick Tips these helpful little tricks. Why not show them how to give me a proper name?

He includes an example of creating a Faker object in the seeder and using it to make name, email, age and city values. Naturally, not everyone's going to have English names or locations, so he shows how to set the language, locale and a few other tips:

  • shortcuts for optional data
  • randomized email addresses
  • random elements from a given set

He also mentions custom providers but points to the Faker documentation for a bit more information about that.

tagged: faker laravel seed seeder dummy data tutorial examples

Link: http://codebyjeff.com/blog/2016/04/hello-mr-asdfgh-qweefg-welcome-to-kgjhjgjh

Laravel News:
Laravel Cheat Sheet
Apr 07, 2016 @ 11:20:09

As is mentioned in this new post to the Laravel News site, there's a handy Laravel Cheat Sheet that's been published to help keep relevant Laravel information at your fingertips.

The Laravel Cheat Sheet is a new project from the EST Group that shows you many of the Laravel features from a filterable web app. For those that have used Laravel for a few years, you may notice the similarities to Jesse O’Briens.

Jesse hasn’t had time to keep his version up to date which left an opening for this new one. However, I’m disappointed in the similarities. Even though both are open source it just feels odd to me that this one looks so much like Jesse’s.

You can view the project directly (via GitHub pages) or grab the source if you'd like to check it out.

tagged: laravel cheatsheet project github information quick reference

Link: https://laravel-news.com/2016/04/laravel-cheat-sheet/

Jeff Madsen:
Eloquent Create, Update, New...the Untold Story 2016-04-01
Apr 06, 2016 @ 12:19:20

Jeff Madsen has a quick post to his site with the "untold story" behind Eloquent's save and create in the Laravel framework.

Over on Laravel Quick Tips we've been looking at a few of these functions and their uses, and I thought it might be helpful to collect all of them together in a single (I hope) coherent post.

Without further preamble, let's get to it. I'm going to use the basic User object and table that ships with a default installation of Laravel so you can follow along if you like.

He starts with the difference between "new" and "create", pointing out the one fundamental difference: one saves, one does not. He then looks at some of the other new/create functions (like findOrNew, firstOrCreate, updateOrCreate), what each of them does in the background and a quick snippet of code showing.

tagged: eloquent laravel create update new behindthescenes difference save

Link: http://codebyjeff.com/blog/2016/04/eloquent-create-update-new-the-untold-story