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
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.
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 “How to set up your Mac for local PHP Development”
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.
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 “Lessons learned from running a weekly newsletter”
Note: This tutorial is only relevant for Laravel 5.1 and lower. Laravel 5.2 has improved how this works.
If you’ve used Laravel’s form validation for any length of time, then you know it’s a powerful system. It makes the tedious task of validation very simple while still keeping the door open for complex rules.
In this tutorial, I want to show you a simple and easy way of validating forms that contain dynamic fields. A common use case for these types of forms is when you would like to allow a user to add more fields to a form.
Continue reading “How To: Validate an array of form fields with Laravel”
MailChimp includes a neat drag and drop email designer, but it lacks the ability to customize your templates outside of just the basics. One such problem is the font choice. By default, it only includes a list of nine web safe fonts.
These fonts are your safest bet if you want to support as many email clients as possible, but I like to make my emails unique. In my opinion, a custom font gives the design a little extra pop and professionalism. In this tutorial, I want to outline a simple way of adding these to MailChimp’s included templates and still keep the nice drag/drop workflow.
Continue reading “Adding Custom Fonts to Mailchimps Drag and Drop Email Designer”
A few months back I created a tutorial on Setting up Gulp, Bower, Bootstrap Sass, & FontAwesome. If you had problems with the tutorial I’m sorry. Apparently the
gulp-ruby-sass npm module I used is undergoing some changes causing the SASS to error out and never compile. I have updated that post to recommend sticking with version
^0.7.1 until v1 stables out.
I’ve also created a GitHub repo with everything setup. This way you can see the exact versions of dependencies I used in the tutorial.
What I do find odd is I had a similar problem with Laravel Elixir a few weeks back. It uses node-sass but something must be going on with the development of both of these plugins. Hopefully, it will all be sorted out and I can stop pulling out my hair.
There are certain times when using Laravel that you would like to migrate and seed the database. Typically this is done via the Artisan command line tool with:
php artisan migrate --seed
You can also call this in your code with the following:
Artisan::call('migrate', ['--seed' => true]);
Nice and simple but the second parameter always trips me up.
Laravel Forge is a service that handles creating servers on popular cloud hosting providers. I use it to host my WordPress sites with DigitalOcean and to handle auto deployments from a git push.
Installing WordPress on a cloud server you need to plan for failure. Typically there is no guarantee that you will not wake up one morning and find the server just gone. I’ve personally ran into that with AWS in the past and now I always plan for it. Continue reading “How to setup WordPress with Forge and DigitalOcean”