Passing Referrer data from SSL

Google is now recommending all sites to start moving to HTTPS by installing an SSL certificate. The benefits include a more secure experience and a rumored slight bump in SEO. I implemented Stripe payments on a site which required an SSL certificate and made the decision to go ahead and make the whole site run over HTTPS. One of the downsides to doing this is I noticed that referral data was no longer sent to sites I linked to.

For some, this may not matter but to me I look at referrer data as a form of marketing. When I link to a site and they see traffic from my site then they will not know I appreciate their work, and hopefully be interested enough to visit my site.

Sending Referrer Data

After a bit of research, I found a draft W3C spec on just this issue and it includes a simple fix in the meta section. By simply adding the following to your HTML you can send this data automatically:

<meta name="referrer" content="unsafe-url">

The W3C document outlines all the available options here and if you would like to have this more restricted please look at those options. For the purpose here unsafe-url, or all in older specs, will send a Referer HTTP header to any URL you link to. One thing to note is, “this will leak origins and paths from TLS-protected resources to insecure origins”. So if you are in admin area or something that shouldn’t be known to the outside world you would never want to use this.

In my case, the site is just a blog and I’m not concerned about leaking any information.

As a final caveat, this W3C spec is a draft. Some browsers Chrome and Firefox are already included support for this meta tag, but others might not be. So if that is important to you, then you will need to figure out a more advanced way of passing this data.

A first look at the Flarum Forum Software

Flarum is a new open source PHP forum system developed by Toby Zerner and Franz Liedke. Toby and Franz both have history in creating forum software and with Flarum they decided to join forces and reimagine the forum landscape.

Gone are the days of the old style forums that has been popular for the past 20 years. With Flarum, it takes a fresh look and is both nice to look at and fully functional.

Let’s take a quick look at these new forums and see what all the excitement is about. Just note that Flarum is currently in beta, and any of this information can change.

Continue reading

Ninjagrl Art

A few months back I decided to rework my entire office. I had grown tired of a tiny corner desk that would only hold a desktop computer and a keyboard. It felt cramped and left little room for writing or planning with real paper and pencil. This desk also featured a large hutch that took up almost an entire wall. Sitting across the room was a large bookcase that also took much of the wall space.

To rearrange, I purchased a new kitchen table to act as a desk that supplied ample room for a desktop computer, a large external monitor, and plenty of extra space for writing. Transforming the table into a desk was a fantastic idea but removing the old desk left an empty bare wall. It needed some pictures or art, and I just couldn’t decide what to get. This changed when I seen the following painting titled “Lumen”:

lumen
Lumen

This painting is from ninjagrl, an artist who started an open source collection making paintings of various projects and sayings within the open source community.

The Lumen piece certainly struck a cord with me because all through high school I would draw this same Anglerfish. I’m not sure what specifically I like about it other than it can represent so many things.

After reaching out she was pretty booked up, but I commissioned two paintings for my now empty wall. One to represent my Laravel News project and another with my two daughters.

I was probably her worst client. I had a vague idea of what I wanted and struggled to articulate clearly what that idea was. After a few emails and asking friends we came up with the idea of a reporter interviewing an elephant. For those not familiar, an elephant is the PHP mascot that Laravel is written in. Then for “Daddy’s Girls” I sent her a picture that she said would be perfect and it just went from there.

Here is what the final product of the two commissions look like:

In the one with my girls notice the rabbit. That is her favorite stuffed animal that she made at one of those “build an animal” places. What is great is that inside its paw is a contraption that when pushed causes the bunny to roar like a dinosaur.

I think they turned out fantastic and can’t wait to hang them on my wall.

The Martian Trailer

I haven’t been this excited to see a movie in a long time. I just finished the book last weekend and it’s all still fresh in mind. When thinking about the movie I was wondering how they were going to do the first half before Watney contacts NASA. Having the SOL logs be in video format is a great idea.

If you haven’t read the book you should. Although be warned it does have some language.

How to set up your Mac for local PHP Development

As a developer I spend countless hours on the computer. Over time I accumulate a ton of cruft. Everything from old forgotten files, unused apps, and worst of all hidden junk that has been installed by following some random tutorial.

This past weekend I decided it was finally time to wipe my Macbook’s hard drive and start fresh. I have used it daily for several years now and still had artifacts from when I used Mamp. Since then Vagrant has turned to my local server of choice and one of the reasons is how clean you can keep your machine by utilizing it.

After finishing the new Mac OS X install it felt like a new beginning. So clean, so minimal. I’ve missed that.

This go around I wanted to keep it as minimal as possible and only install things I know I need and use. This tutorial covers how I set up my Mac for local PHP Development. Continue reading

Laravel and Stripe

Over the past few years, I’ve implemented Laravel and Stripe on multiple occasions. Everything from subscriptions to one-off purchases. When I started, Laravel Cashier wasn’t invented yet and it was a totally different beast, but now with Cashier it takes a lot of the pain away by having a simple API.

But with selling products and subscriptions there are many other aspects you need to think about and it’s easy to get intimidated thinking about all the features you need. Or worse, where to even start?

I wanted to share my knowledge on the subject and teamed up with an experienced author, W. Jason Gilmore, to create a new book on the subject, Easy E-Commerce using Laravel and Stripe. Jason has authored numerous books and has also built a 10,000+ product online store and a SAAS for the interior design and architectural industries.

We wanted to create a fun hands-on book taking you from the start of a project all the way through implementing product sales, digital downloads, and subscriptions.

The book is written around a fictional lawn care company that has hired you. But Mr. McDew, the owner of the company, is a stickler and wants to be sure you know what you are doing. So after each project phase he drills you with questions about the implementation, and if you answer correctly you get to move on to the next phase.

No web development book would be complete without sample code and we include many code samples, plus a complete companion project. This allows you to use it not only as a learning resource but you can run the app locally to test and play around with.

Some of the highlights include:

  • You will receive all of the source code to a real-world online store
  • Comprehensive, step-by-step instructions showing you how to integrate Stripe into your Laravel application using Cashier.
  • Learn how to integrate Stripe in a fun, entertaining, and unintimidating fashion by following along with the creation of a real-world project for a fictional company.
  • You’ll learn about many of the concepts central to building an online store, such as how to build a product management interface, and a one-time URL generator for downloading electronic products.

We also cover other Stripe features such as the “buy now” modal window, validating credit card forms, adding coupons and discounts, swapping subscriptions, and even implementing custom Stripe web hooks for sending emails.

Save yourself time and learn how to implement Laravel and Stripe today.

Slack vs Hipchat – It’s not the design

I came across two posts discussing the design aspect of Slack and it’s $2.8 Billion Dollar Secret Sauce with a follow up from a designer working on HipChat, Slack’s design is not secret sauce.

Both of these got me thinking about the differences in the apps and for me they are both wrong. Both designs are good enough for my everyday communication. The only reason Slack is winning is because of the multiple account logins. At work, we used Hipchat, and it was a fine product that got the job done. Where it started lacking is when I would get invited to another companies account. The only way to use both was to have the browser open for one and the app for the primary. It was horrible.

That single feature alone made me champion the move to Slack. Of course, the ability to create public channels so open source projects, and teams can move off the dreadful IRC is another wonderful feature.

Laravel Query Debugging

I wrote a tutorial over on Scotch.io on debugging queries in Laravel. I go through three different ways, from using the ->toSql(), DB::listen, and the debugbar.

This is also my first time writing outside of my personal sites. So it was a lot of fun to see how the big sites operate.

Lessons learned from running a weekly newsletter

Yesterday marks the one-year anniversary of my weekly Laravel News newsletter. I managed to send a new issue almost every week and only missed two because of vacations. I had no idea what I was doing in the beginning, and still every week I’m learning something new about the science behind newsletters. In this post, I want to share some of the behind scenes on running the newsletter, a few stats, mistakes I made, and lessons learned during this first year. Continue reading

Questions to ask an employer during an interview

When interviewing for a new job it’s easy to fall in a trap of missing some very important questions about the company. The whole interview process is nerve-racking and there is so much focus on you that it’s easy to forget to find out about the internal workings of the company.

The InterviewThis project aims to help you find out the most important questions a developer should be asking before taking a new job.

Some of the topics include:

  • Development Process
  • Codebase / Architecture
  • Monitoring / On-call duty
  • Company Culture
  • PHP Environment – Framework/Composer/Style
  • Remote Life

By having a list of questions like this you can go into the interview fully prepared.

If you are looking for a new job be sure and check out Larajobs as it’s a great resource for finding companies looking for developers.