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

Stomt Blog:
Shared Components Across Multiple Laravel/Lumen Micro-Services
Oct 21, 2016 @ 12:19:30

On the Stomt blog today there's a post showing how you can share components across Laravel/Lumen applications using a simple structure and making things like microservices easier.

In this blog post, we show a way to split up large Laravel applications into smaller micro-services, in our case Laravel & Lumen applications, and the advantages and pitfalls it brings with it. As a result, we sped up our applications by more than 30% and achieved greater maintainability, too. These principles can, of course, be easily applied to other frameworks.

A lot of functions are needed in our REST API as well as in our administration panel. [...] While we still have a “monolithic” codebase, we have multiple completely independent backend applications. You might want to call them “micro-services” (because it’s so trendy).

These microservices required similar functionality and splitting those out into shared components made sense. They walk you through some of the basic requirements they had when splitting the application and how the components are structured. They then shift over to the Laravel/Lumen side and show how multiple applications can be hosted via the same installation and where the shared components fit in. They show how to define namespaces to load the components and set up the providers so Laravel/Lumen knows how to use them.

tagged: laravel microservice shared component tutorial

Link: https://www.stomt.com/blog/shared-components-across-multiple-laravel-lumen-micro-services/

Laravel News:
Laravel News Podcast Episode 28
Oct 20, 2016 @ 12:07:18

The Laravel News site has released the latest episode of it's podcast, episode #28, covering Laravel 5.3.18, Yarn, Leanpub and more.

In this episode, we discuss Yarn, Facebook's new JavaScript package manger, the new Laravel Links section, and lots of other random topics.

This is our last podcast episode for 2016 and we will be taking a break until next year.

Other topics mentioned also include Laravel Links, case sensitive filesystems in development and Powershell for Mac/Linux. You can listen to this latest episode either using the in-page player or by subscribing to their feed and getting this and other great episodes as they're released.

tagged: laravelnews laravel podcast news ep28 yarn leanpub ericbarnes jackfruh

Link: https://laravel-news.com/podcast/28

Matt Stauffer:
The new Notification system in Laravel 5.3
Oct 20, 2016 @ 09:32:44

In the latest part of his series covering Laravel 5.3, Matt Stauffer has posted this new tutorial covering the new notification system in the latest version of the popular Laravel framework.

In a previous blog post I've covered Laravel's new Mailable feature, which introduces some important changes to how we send mail in Laravel. I'd recommend at least skimming it if you haven't read it yet. In short, the preferred mail syntax is no longer sending mail using the "classic" mail closures, but instead creating a "Mailable" class for each message you want to send—for example, the "WelcomeNewUser" mailable class.

In Laravel 5.3, we have another new feature for communicating with our users: Notifications.

This notification system makes it simpler to send messages to your user when you don't care as much how they get it, just that they do. He walks you through the creation of your first notification class and breaks it down into its main parts, explaining each one. He shows how to define the different handlers for the notification types (like "toEmail") and how to trigger the notification, passing in either a single user or all users in the system. He then talks about the channels that are available to notifications and how to integrate several including Nexmo, database and the "broadcast" channel.

tagged: laravel notification system tutorial introduction channel trigger

Link: https://mattstauffer.co/blog/the-new-notification-system-in-laravel-5-3

Laravel News:
Learn how to use the TNTSearch driver with Laravel Scout
Oct 19, 2016 @ 11:52:50

On the Laravel News site there's a new tutorial posted showing you how to hook in the TNTSearch package with the Laravel Scout functionality replacing the default Algolia driver.

Laravel Scout provides a simple, driver-based solution for adding full-text search to your Eloquent models.

Out of the box, Laravel 5.3 ships with Algolia driver. However, we can easily write custom drivers; that’s exactly what TeamTnt has done by providing a TNTSearch driver for Laravel Scout.

The tutorial then walks you through getting the TNTSearch driver installed and integrated into your Laravel application (via Composer). They they show it in use on a sample database of film information and creating the related models. They show how to add in the "Searchable" trait for Scout, indexing the data and using the "search" method to locate matching results.

tagged: tntsearch driver scout laravel tutorial search

Link: https://laravel-news.com/2016/10/tntsearch-with-laravel-scout/

Full Stack Radio:
52: Taylor Otwell - Patterns for Simplifying Laravel Applications
Oct 18, 2016 @ 09:38:05

The Full Stack Radio podcast, hosted by Adam Wathan, has posted their latest episode - an interview with Taylor Otwell, creator and lead developer on the Laravel (and most of the projects in its ecosystem).

In this episode, Adam and Taylor Otwell have a discussion about strategies they use to write cleaner, simpler code when working with the Laravel framework.

They talk about several of the other packages/products in the Laravel ecosystem (like Valet, Spark and Passport) as well as some of Taylor's thoughts on simplifying code including a few other links to presentations and tutorials on the same topics. You can listen to this latest episode either using the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter for updates on when new episodes are released.

tagged: fullstackradio taylorotwell laravel simplify patterns development podcast ep52

Link: http://www.fullstackradio.com/52

Laravel News:
Laraconf Brazil 2016
Oct 17, 2016 @ 11:53:12

On the Laravel News site there's a post that wraps up Laraconf Brazil 2016 with a quick summary for those that weren't able to attend.

The Laravel community in South America put together their first unofficial one day Laravel conference in Brazil on October 8th.

“What I most enjoyed was the ability to network with every attendee,” said Matheus Marabesi one of the organizers, “people around Brazil came to our conference, and it was amazing”.

The event featured ten talks from scaling applications to TDD, to career development. It was a nice mixture of things developers care about. They also, with the help of the sponsors, were able to record every talk and have it available in a YouTube playlist.

As the conference was in Brazil, the sessions aren't in English unfortunately. They included sessions covering: caching strategies, test-driven development, multi-tenant architecture and Elasticsearch. The post also includes several photos from the event and answers to a few other questions from organizer Matheus Marabesi.

tagged: laraconfbrazil16 brazil conference wraup laravel laracon

Link: https://laravel-news.com/2016/10/laraconf-brazil-2016/

How I Open Sourced My Way to My Dream Job: Mohamed Said
Oct 17, 2016 @ 10:15:19

On the CodeForALiving.io site (from StackOverflow) there's an interview with Mohamed Said, the first official employee for Laravel (and its related ecosystem).

Mohamed Said got his first computer at age 13—they were just becoming commonly accessible in Egypt—and started learning to code almost immediately. Flash was what drew him in, he says, with its animations and color and, well, “flashy” stuff.

[...] Last month, Mohamed Said became the first full-time hire at Laravel, an open source PHP framework built by Taylor Otwell. Otwell built the framework as a side project, and when it took off, quit his job to work on it full time. Just a few months ago, he decided he needed help maintaining the project and posted his first full-time job opening, and Said was an obvious choice.

The interview gets into some of Mohamed's background as a developer and his own personal experiences with the Laravel framework. The article then moves on to some of his work in open source software and how he grew into the Laravel community overall. He talks some about roadblocks he came up against along the way but encourages people to contribute, mentioning both the growth it can provide and how to get started with your own contributions.

tagged: opensource mohamedsaid laravel employee developer interview story

Link: http://www.codeforaliving.io/how-i-open-sourced-my-way-to-my-dream-job-mohamed-said

Laravel News:
Improvements to the Laravel unique and exists validation rules
Oct 12, 2016 @ 09:36:42

On the Laravel News site there's a new post sharing some improvements with "unique" and "exists" validation that will be a part of the framework starting in version 5.3.18.

Validating requests in Laravel is simple with its ValidatesRequests trait that is automatically included through the BaseController.

It’s powerful and provides a lot of useful rules for common use cases. Two rules, exists() and unique(), are used to validate against data stored in your database. [...] The style of this is not the easiest to remember and it’s something you almost always have to consult the docs on.

Starting with Laravel v5.3.18 both of these rules have been simplified with an introduction of a new Rule class.

They include some code examples of using this new Rule class and how to use it right along side the current validation rule format for more complex validation needs. There's also a mention of an extra "bonus" that comes with the functionality: a conversion method for translating new rules back into strings.

tagged: laravel improvement unique exists validation rule

Link: https://laravel-news.com/2016/10/unique-and-exists-validation/

Community News:
Laracon EU 2016 Videos Published
Oct 07, 2016 @ 10:25:53

As Freek Van der Herten mentions in his latest post to his site, the videos for all of the sessions at this year's Laracon EU conference have been posted on their official YouTube channel.

This year’s Laracon EU was an amazing conference. The venue was astonishing, there were lots of cool talks and interesting people to talk to. If you’re using Laravel or PHP going to this conference really is a no brainer.

If you were unable to attend or want to see the talk you missed during the conference you can now do so. The organisers have uploaded video’s of all talks to their YouTube channel.

Freek talks briefly about his presentation (covering backups in Laravel applications) and mentions some of the future plans for the backup package that he's created to make it simpler. Other sessions that were presented at the conference also included:

The full playlist can be found on the Laracon Youtube channel.

tagged: laraconeu16 video published youtube sessions conference laravel

Link: https://www.youtube.com/watch?v=mTRH6vjWG_E&list=PLMdXHJK-lGoCMkOxqe82hOC8tgthqhHCN

Laravel News:
Installing Bourbon and Neat with Laravel Elixir
Oct 06, 2016 @ 10:25:09

On the Laravel News site a tutorial has been published showing you how to install Bourbon and Neat with Laravel's "elixir" functionality (a wrapper around the popular Gulp installation tool for Javascript and CSS library handling.

Laravel Elixir is a wrapper that simplifies working with Gulp, it makes compiling, concating, minifying and versioning your JavaScript and CSS files very fluent and easy.

Because many projects using Bootstrap, when you start a new Laravel project, you will find that it is included by default as a basic starting point, but Laravel does not dictate which JavaScript or CSS frameworks you should use. One alternative is Bourbon and Neat created by thoughtbot.

Bourbon is a mixin library for Sass and Neat is a Bourbon addon for creating semantic grids. In this tutorial let’s take a look at how to setup these tools with Laravel Elixir.

They start with a brief overview of the Bourbon tool, showing how it helps to reduce the amount of duplicate code in your source files. There's also a bit about Neat, a responsive grid library that makes it easier to keep your layout "clean and semantic". With those defined they get into the installation of these two packages with two different approaches:

  • First installing Bourbon/Neat via npm then importing them in the SASS config
  • Or installing them via npm, edit the Gulp configuration then import them relatively

With either of these methods in place the Elixir tool can then run the compilation right alongside the other sources and push the resulting CSS out the other side including the Bourbon and Neat functionality.

tagged: laravel install configure elixir bourbon neat semantic clean tutorial

Link: https://laravel-news.com/2016/10/installing-bourbon-neat-laravel-elixir/